freeCodeCamp/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-grid-by-building-.../6165d3b702a5d92ad970b30c.md

2.5 KiB

id title challengeType dashedName
6165d3b702a5d92ad970b30c Passo 5 0 step-5

--description--

Após o elemento img, adicione um elemento h1 com a class definida como hero-title e o texto definido como OUR NEW CURRICULUM, seguido por um elemento p com a class definida como hero-subtitle e o texto definido como Our efforts to restructure our curriculum with a more project-based focus.

--hints--

Você deve criar um elemento h1.

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

O elemento h1 deve vir depois do elemento img.

assert(document.querySelector('h1')?.previousElementSibling?.localName === 'img');

O elemento h1 deve ter a class definida como hero-title.

assert(document.querySelector('h1')?.className === 'hero-title');

O elemento h1 deve ter o texto definido como OUR NEW CURRICULUM.

assert(document.querySelector('h1')?.textContent === 'OUR NEW CURRICULUM');

Você deve criar um novo elemento p.

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

O elemento p deve vir depois do elemento h1.

assert(document.querySelector('p')?.previousElementSibling?.localName === 'h1');

O elemento p deve ter a class definida como hero-subtitle.

assert(document.querySelector('p')?.className === 'hero-subtitle');

O elemento p deve ter o texto definido como Our efforts to restructure our curriculum with a more project-based focus.

assert.equal(document.querySelector('p')?.textContent?.trim()?.replace(/\s{2,}/, ' '), 'Our efforts to restructure our curriculum with a more project-based focus');

--seed--

--seed-contents--

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Magazine</title>
    <link
      href="https://fonts.googleapis.com/css?family=Anton%7CBaskervville%7CRaleway&display=swap"
      rel="stylesheet"
    />
    <link
      rel="stylesheet"
      href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
    />
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
--fcc-editable-region--
    <main>
      <section class="heading">
        <header class="hero">
          <img
            src="https://cdn.freecodecamp.org/platform/universal/fcc_meta_1920X1080-indigo.png"
            alt="freecodecamp logo"
            loading="lazy"
            class="hero-img"
          />
        </header>
      </section>
    </main>
--fcc-editable-region--
  </body>
</html>