1.9 KiB
1.9 KiB
id | title | challengeType | dashedName |
---|---|---|---|
5dfa3589eacea3f48c6300ae | Passo 17 | 0 | step-17 |
--description--
Dentro do segundo elemento section
, adicione um novo elemento h2
com o texto Cat Lists
.
--hints--
O elemento section
deve ter uma tag de abertura. As tags de abertura têm essa sintaxe: <elementName>
.
assert(
document.querySelectorAll('section').length === 2 &&
code.match(/<\/section>/g).length === 2
);
O elemento h2
deve ter uma tag de abertura. As tags de abertura têm essa sintaxe: <elementName>
.
assert(document.querySelectorAll('h2').length === 2);
O elemento h2
deve ter uma tag de fechamento. As tags de fechamento têm um caractere /
logo após o caractere <
.
assert(code.match(/<\/h2\>/g).length === 2);
O segundo elemento h2
deve estar logo acima da tag de fechamento do segundo elemento section
. Ele não está na posição correta.
const secondSection = document.querySelectorAll('section')[1];
assert(secondSection.lastElementChild.nodeName === 'H2');
O segundo elemento h2
deve ter o texto Cat Lists
. Você omitiu o texto ou tem um erro de digitação.
assert(
document
.querySelectorAll('main > section')[1]
.lastElementChild.innerText.toLowerCase() === 'cat lists'
);
--seed--
--seed-contents--
<html>
<body>
<h1>CatPhotoApp</h1>
<main>
<section>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</section>
--fcc-editable-region--
<section>
</section>
--fcc-editable-region--
</main>
</body>
</html>