freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-flexbox-by-buildi.../61537c5f81f0cf325b4a854c.md

1.3 KiB

id title challengeType dashedName
61537c5f81f0cf325b4a854c Step 4 0 step-4

--description--

Aggiungi un elemento header all'interno dell'elemento body e assegnagli la classe header.

All'interno dell'header, crea un h1 con il testo css flexbox photo gallery.

--hints--

Dovresti avere un elemento div all'interno dell'elemento body.

assert.exists(document.querySelector('body')?.querySelector('header'));

L'elemento header dovrebbe avere un attributo class con il valore header.

assert(document?.querySelector('body')?.querySelector('header')?.classList?.contains('header'));

L'elemento header dovrebbe avere un elemento h1 al suo interno.

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

L'elemento h1 dovrebbe avere il testo css flexbox photo gallery al suo interno.

assert(document?.querySelector('.header')?.querySelector('h1')?.innerText === 'css flexbox photo gallery');

--seed--

--seed-contents--

--fcc-editable-region--
<!DOCTYPE html>
<html>
  <head lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Photo Gallery</title>
    <link rel="stylesheet" href="./styles.css">
  </head>
  <body>
  </body>
</html>
--fcc-editable-region--