FCC personal portfolio project user story #2 issue

Tell us what’s happening:
Can’t pass user story #2

Your code so far

  <h1 id="welcome-section">Hi! I'm David!</h1>
  <p id="welcome-section">software builder</p>

Your browser information:
Google Chrome is up to date

Version 77.0.3865.90 (Official Build) (64-bit)
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36.

Link to the challenge:

So right now, you have an <h1> with the id of welcome-section.

What the test in question is saying is, there should be an element (for example, maybe a <header></header>) with that id, that contains an <h1>...</h1>.

awesome thanks!

<header id="welcome-section">
    <h1>Hi! I'm David!</h1>
    <p>software builder</p>

passed but i don’t get why the “welcome section” required a header tag; seems arbitrary or is that a common practice?

It doesn’t require the header tag - it could be a div or some other block element. The test itself simply says:

The welcome section should have an h1 element that contains text.

So it’s saying there should be an element that contains an h1, and that h1 should contain some text. Using a header is a logical structural content point, though – h1 tags are typically only used for the page/site header, and thus they are often found in the header. :wink:

Just as an aside. You shouldn’t use the same id more than once as ids are supposed to be unique. This is also important with the challenges because the test is looking for specific ids.

1 Like