freeCodeCamp/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-by-building-a-ca.../5ef9b03c81a63668521804d0.md

2.2 KiB

id title challengeType dashedName
5ef9b03c81a63668521804d0 Passo 24 0 step-24

--description--

Enfatize a palavra love no elemento figcaption encapsulando-o em um elemento em.

--hints--

O elemento de ênfase em deve ter uma tag de abertura. As tags de abertura têm essa sintaxe: <elementName>.

assert(document.querySelector('em'));

O elemento de ênfase em deve ter uma tag de fechamento. As tags de fechamento têm um caractere / logo após o caractere <.

assert(code.match(/<\/em\>/));

Você excluiu o elemento figcaption ou está faltando nele uma tag de abertura ou fechamento.

assert(document.querySelector('figcaption') && code.match(/<\/figcaption\>/));

O elemento de ênfase em deve estar ao redor do texto love. Você omitiu o texto ou tem um erro de digitação.

assert(
  document.querySelector('figcaption > em').innerText.toLowerCase() === 'love'
);

O texto da figcaption deve ser Cats love lasagna. Verifique erros de digitação e se os espaços necessários estão presentes ao redor das tags de abertura e fechamento do elemento em.

assert(
  document
    .querySelector('figcaption')
    .innerText.replace(/\s+/gi, ' ')
    .match(/cats love lasagna\.?/i)
);

--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>
        <h2>Cat Lists</h2>
        <h3>Things cats love:</h3>
        <ul>
          <li>cat nip</li>
          <li>laser pointers</li>
          <li>lasagna</li>
        </ul>
        <figure>
          <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
--fcc-editable-region--
          <figcaption>Cats love lasagna.</figcaption>
--fcc-editable-region--
        </figure>
      </section>
    </main>
  </body>
</html>