+ 2

Making navigation bars with HTML - question - how do the nav bars work?

When we make navigation bars, Home, about, Contact...) Do we need JavaScript to make the nav bars work? If the default is Home, wouldn't we need JavaScript for the content to switch to the About page (maybe onclick event)?

1st Jul 2019, 12:27 AM
Ginfio
Ginfio - avatar
4 Réponses
+ 2
No, you can make each text a hyperlink.
1st Jul 2019, 2:31 AM
Frenchtoast
Frenchtoast - avatar
+ 2
No, you do not need JS to make the navbars work. Just create links with the <a href=""> element to target page or part of the page you want. <li><a href="home">home</a></li>
1st Jul 2019, 2:48 AM
Chris Coder
Chris Coder - avatar