10 Jul HTML5 nav Tag
The HTML5 nav tag is used to define navigation links. Use the <nav> tag when you need to set a group of links, not every link of the document.
Example
Here’s an example adding navigation links using the nav tag,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<!DOCTYPE html> <html> <head> <title>Understanding HTML5 nav tag</title> </head> <body> <p>Studyopedia Sections</p> <nav> <a href="https://studyopedia.com/tutorials/">Tutorials</a> | <a href="https://studyopedia.com/quiz/">Quiz</a> | <a href="https://studyopedia.com/forums/">Forums</a> </nav> </body> </html> |
Here’s the output, we added three sections under the HTML5 nav element and now it is looking like a horizontal menu,
No Comments