Navbar not functional

Hello!

I am currently working on my 4th project for the HTML and CSS section of the curriculum and I have hit a road bump. Before moving onto CSS, I have noticed that the navbar that I have added doesn’t seem to be working and I am not sure why :frowning:

I have also added the main -section element with a header that includes an ID, but when running the test, I continue to fail those tasks ( 3,4,13).
It would be much appreciated if anyone is kind enough to point out my coding errors.

Thanks in advance!

https://codepen.io/sarahkaal/pen/poENEjq

When adding ID’s to the different sections you don’t need the # for example #introduction. When declaring the ID’s you just need to declare the name without the hashtag
e.g id=“introduction”

The # is only added to the anchor tags href e.g introduction This tells the browser where to scroll to in the document.

When declaring id, you don’t need hash. We use it only to reference existing ids:

<a href="#contact">Go to Contact</a>

<div id="contact">...</div>

@mcfeegles @sitek94
thanks for your feedback!
I have removed the # from my id, and now it is working, but I am still failing the task after the alteration :frowning:

I have removed all these hash tags and it now passes 14/16 tests but also there where some unclosed tags. You can analyze your code in codepen like this:

LIFE SAVER!
I cant believe i managed to do 3/5 projects without knowing about this analyze gem, thanks again!

1 Like

Better late than never :partying_face: