1.5 KiB
1.5 KiB
id | title | challengeType | dashedName |
---|---|---|---|
5dfa37b9eacea3f48c6300b0 | Step 20 | 0 | step-20 |
--description--
Dopo l'elemento h3
con il testo Things cats love:
, aggiungi un elemento lista non ordinata (ul
). Nota che a questo punto non verrà visualizzato nulla.
--hints--
L'elemento ul
deve avere un tag di apertura. I tag di apertura hanno questa sintassi: <nomeElemento>
.
assert(document.querySelector('ul'));
L'elemento ul
dovrebbe avere un tag di chiusura. I tag di chiusura hanno un /
subito dopo il carattere <
.
assert(code.match(/<\/ul>/));
Ci dovrebbe essere un elemento ul
proprio sopra il tag di chiusura del secondo elemento section
.
const secondSectionLastElemNode = $('main > section')[1].lastElementChild;
assert(secondSectionLastElemNode.nodeName === 'UL');
--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>
<section>
--fcc-editable-region--
<h2>Cat Lists</h2>
<h3>Things cats love:</h3>
--fcc-editable-region--
</section>
</main>
</body>
</html>