freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-basic-css-by-building.../5f3477ae8466a9a3d2cc953c.md

1.0 KiB

id title challengeType dashedName
5f3477ae8466a9a3d2cc953c Step 15 0 step-15

--description--

Ora che hai il CSS nel file styles.css, rimuovi l'elemento style e tutto il suo contenuto. Una volta rimosso, il testo centrato tornerà a sinistra.

--hints--

Non dovresti avere un elemento style nel codice.

assert(!code.match(/style/i));

Non dovresti avere alcun selettore CSS nel file HTML.

(getUserInput) => {
  const html = getUserInput('editableContents');
  assert(!html.includes('style'));
  assert(!html.includes('text-align'));
}

--seed--

--seed-contents--

<!DOCTYPE html>
<html lang="en">
--fcc-editable-region--
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
    <style>
      h1, h2, p {
        text-align: center;
      }
    </style>
  </head>
--fcc-editable-region--
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>
h1, h2, p {
  text-align: center;
}