User Story #8: I can see a
nav element with a corresponding
Where do I put this nav tag for the Techincal Website challenge?
Is the place I put it right? the challenge also says that there needs to be a
<header> element which would contain the text, but wouldn’t
<a href="#"> Text here </a> work?
Are you having problems with the challenge? If not, then the
nav can go anywhere you want. The idea of a
nav is to provide navigation and that navigation can go in the
header (and a
header can go inside
section) or in the sidebar inside an
If you’re worried about how the challenge will find it, then you just have to provide the id and the test will work :
<!-- put your links here -->
Is the place I put the
<nav> element good? The challenge also asks me to put a
<header> element to put text in, but I’m not sure how that would look. So can’t I just do this
<a href="#"> Text Here </a>?
Nvm it’s just a title. Edit actually then I put it my score went down by a point. Edit again I put
nav under the
<header> like you did and my score didn’t went down.
Yes, it’s one of the places it can go, but I would put it inside a header if it’s meant to be a navigation for the entire
section. If it’s meant to be the main navigation, then it should go inside a header at the top of the page, where it attracts attention and/or ease of use. Always place yourself on the shoes of the user, how she would interact, how easy it’s for her to reach the content on your website.
You could put a
header inside a
section tag and there put text:
<a href="#">Link to some place</a>
Neque porro quisquam est qui
<p>Blah blah blah...</p>
That’s up to you , that’s what CSS is for.
Do I put it under
#About_HTML. which is below the former id?
The challenge doesn’t require you to put it somewhere specifically, but, to be sure, I would put it under the
<nav>'s place to under
#main-doc, then I filled it in as said in this User Story.
User Story #13: When I click on a navbar element, the page should navigate to the corresponding section of the
main-doc element (e.g. If I click on a
nav-link element that contains the text “Hello world”, the page navigates to a
section element that has that id and contains the corresponding
header . Also in the test the error is 4.
And all links do work, but my score didn’t increase from 10, I wonder why?
below the failed test (it’s always a good thing to check there to know why the test is failing) there is written
Some "main-section" elements are missing the following ids (don't forget to replace spaces with underscores!) : EXAMPLES_OF_HTML_TAGS,EXAMPLES_OF_HTML_ATTRIBUTES
check if you have written all
I got it a fixed, it was a typo. Thanks everyone for the help.
The idea of a nav is to provide navigation and that navigation can go in the header (and a header can go inside section) or in the sidebar inside an aside element. If you’re worried about how the chal…