Two heading titles have links for some reason in Personal Portfolio project

https://codepen.io/aarxnp1/pen/zYprYbJ

I’ve only been coding for a short period of time so forgive me if this seems like a stupid questions, but for some reason the welcome section <h1> and project section <h1> has a link whereas the contact section

does not. Would anyone mind helping me to figure out why?

Thanks, Aaron

HI @aaron0pallichan !
Welcome to the forum!

I briefly looked at your code and couldn’t find an <h1></h1> element.
I see a few headers but no h1 elements.
That is what the test is looking for

1 Like

Oops! Sorry about that, my mistake. I’ve changed them back to h1, as I made them header when I was troubleshooting. Still can’t figure it out though. :frowning:

You have a few syntax errors in your code.
That is why you are getting this link issue.

First take a close look here

    <li> <a href="#welcome-section" class="nav-link"> About me </li>
    <li> <a href="#projects" class="nav-link"> Projects </li>
    <li> <a href="#contact" class="nav-link"> Contact me </li>

You are missing closing tags for each of those anchor tags.

You also have other syntax issues, like this

  <h1> Contact me </g>

and this

  <li><a href="https://www.freecodecamp.org/aaron-p1" id="profile-link" target="_blank"> FCC Profile </li>

I would slowly go through your html to clean up the syntax errors.
Codepen has a tool to highlight errors in your code.

Once you fix all of those errors then your html page should behave the way it is supposed to.

Hope that helps!

1 Like

Also, a few other things to note. :grinning:

No.1:
The h1 element should only be used once per html page.
This element is supposed to represent the most important heading on the page.
I would only use it once and then use h2’s later on.

No.2:
You really shouldn’t use br tags like this.

<br>
  <br>
  <br>
  <br>

If you need to create space between elements, then use css margins.
here is the correct use for the br tag.

Hope that helps!

1 Like

Thank you so much fort your insightful response, It was really helpful! Really glad I came to the forums! :slight_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.