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

1.4 KiB

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

--description--

Adicione um elemento link de fechamento automático ao elemento head. Dê a ele o valor do atributo rel de stylesheet e o valor do atributo href de styles.css.

--hints--

O código deve ter um elemento link.

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

Você não deve mudar as tags head existentes. Verifique se você não excluiu a tag de fechamento.

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

Você deve ter um elemento link de autofechamento.

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

O elemento link deve estar dentro do elemento head.

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

O elemento link deve ter o atributo rel com o valor stylesheet.

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

O elemento link deve ter o atributo href com o valor 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>