freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-forms-by-buildin.../62cc5b1779e4d313466f73c5.md

1.4 KiB

id title challengeType dashedName
62cc5b1779e4d313466f73c5 Step 5 0 step-5

--description--

Annida un elemento link autoconcludente nell'elemento head. Dagli un attributo rel con valore di stylesheet e un attributo href con valore di styles.css.

--hints--

Il codice dovrebbe avere un elemento link.

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

Non dovresti cambiare i tag head esistenti. Assicurati di non aver eliminato il tag di chiusura.

const heads = document.querySelectorAll('head');
assert.equal(heads?.length, 1);

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">
--fcc-editable-region--
  <head>
    <meta charset="UTF-8">
    <title>Registration Form</title>
  </head>
--fcc-editable-region--
  <body>
  </body>
</html>