Back to Freecodecamp

Step 2

curriculum/challenges/english/blocks/workshop-blog-page/66a49f685961e997e337cab1.md

latest1.1 KB
Original Source

--description--

The header will be responsible for displaying main title, image and page navigation for the blog.

Inside the header element, add an h1 with the text of Welcome to Mr. Whiskers' Blog Page!.

--hints--

You should have an opening h1 tag.

js
assert.match(code, /<h1>/i);

You should have a closing h1 tag.

js
assert.match(code, /<\/h1>/i);

Your h1 element should have the text of Welcome to Mr. Whiskers' Blog Page!. Double check for any spelling errors.

js
const h1Text = document.querySelector("h1")?.innerText.trim();
assert.strictEqual(h1Text, "Welcome to Mr. Whiskers' Blog Page!");

Your h1 element should be nested inside your header element.

js
const h1Element = document.querySelector("h1");
assert.strictEqual(h1Element?.parentElement.tagName, 'HEADER');

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Mr. Whiskers' Blog</title>
    <meta charset="UTF-8" />
  </head>
  <body>
    <header>
--fcc-editable-region--
      
--fcc-editable-region--
    </header>
  </body>
</html>