Back to Freecodecamp

Step 40

curriculum/challenges/english/blocks/workshop-cat-photo-app/5ef9b03c81a63668521804ec.md

latest2.5 KB
Original Source

--description--

Notice that the entire contents of the page are nested within an html element. The html element is the root element of an HTML page and wraps all content on the page.

You can also specify the language of your page by adding the lang attribute to the html element.

Add the lang attribute with the value en to the opening html tag to specify that the language of the page is English.

--hints--

You have either deleted the html element or it is missing an opening tag or closing tag.

js
assert.match(code, /\<html.*?\>/);
assert.match(code, /\<\/html\>/);

Your html element should have a lang attribute with the value en. You may have omitted the attribute/value, or have a typo.

js
const extraSpacesRemoved = code.replace(/\s+/g, " ");
assert.match(extraSpacesRemoved, /\<html\s+lang\s*\=\s*("?|'?)en\1\s*\>/);

--seed--

--seed-contents--

html
--fcc-editable-region--
<html>
--fcc-editable-region--
  <head>
    <title>CatPhotoApp</title>
  </head>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <section>
        <h2>Cat Photos</h2>
        <p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
        <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
        <a href="https://freecatphotoapp.com"></a>
      </section>
      <section>
        <h2>Cat Lists</h2>
        <h3>Things cats love:</h3>
        <ul>
          <li>catnip</li>
          <li>laser pointers</li>
          <li>lasagna</li>
        </ul>
        <figure>
          
          <figcaption>Cats <em>love</em> lasagna.</figcaption>  
        </figure>
        <h3>Top 3 things cats hate:</h3>
        <ol>
          <li>flea treatment</li>
          <li>thunder</li>
          <li>other cats</li>
        </ol>
        <figure>
          
          <figcaption>Cats <strong>hate</strong> other cats.</figcaption>  
        </figure>
      </section>
    </main>
    <footer>
      <p>
        No Copyright - <a href="https://www.freecodecamp.org">freeCodeCamp.org</a>
      </p>
    </footer>
  </body>
</html>