freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-intermediate-css-by-b.../60b80da8676fb3227967a731.md

1.3 KiB

id title challengeType dashedName
60b80da8676fb3227967a731 Step 3 0 step-3

--description--

Vai avanti e collega il tuo file CSS, anche se non hai ancora scritto alcun CSS.

Aggiungi un elemento link con un attributo rel di stylesheet e un href con il valore styles.css.

--hints--

Il codice dovrebbe avere un elemento link.

assert.match(code, /<link/)

Dovresti avere un elemento link auto-concludente.

assert(document.querySelectorAll('link').length === 1);

L'elemento link dovrebbe essere all'interno dell'elemento head.

assert.exists(document.querySelector('head > link'));

L'elemento link dovrebbe avere un attributo rel con il valore stylesheet.

const link_element = document.querySelector('link');
const rel = link_element.getAttribute("rel");
assert.equal(rel, "stylesheet");

L'elemento link dovrebbe avere un attributo href con il valore styles.css.

const link = document.querySelector('link');
assert.equal(link.dataset.href, "styles.css");

--seed--

--seed-contents--

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Picasso Painting</title>
    --fcc-editable-region--

    --fcc-editable-region--
  </head>
  <body>
  </body>
</html>