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
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!
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
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>
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
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:
I cant believe i managed to do 3/5 projects without knowing about this analyze gem, thanks again!