- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML
The <nav> element in HTML is used to set navigation links in an HTML document. This tag introduced in HTML5.
Let us now see an example to implement <nav> tag in HTML −
Example
<!DOCTYPE html> <html> <body> <nav> <a href="/tutorialslibrary/">Tutorials</a> | <a href="/programming_examples/">Codes</a> | <a href="/online_dev_tools/">Tools</a> | <a href="/articles/">Articles</a> | <a href="/questions/index.php/">QA</a> | <a href="/current_affairs/index.htm/">Current Affairs</a> </nav> </body> </html>
Output
Above, we have set some hyperlinks with <a> tag and href attribute −
<a href="/tutorialslibrary/">Tutorials</a> | <a href="/programming_examples/">Codes</a> | <a href="/online_dev_tools/">Tools</a> | <a href="/articles/">Articles</a> | <a href="/questions/index.php/">QA</a> | <a href="/current_affairs/index.htm/">Current Affairs</a>
To arrange them properly, we have used the <nav> element −
<nav> <a href="/tutorialslibrary/">Tutorials</a> | <a href="/programming_examples/">Codes</a> | <a href="/online_dev_tools/">Tools</a> | <a href="/articles/">Articles</a> | <a href="/questions/index.php/">QA</a> | <a href="/current_affairs/index.htm/">Current Affairs</a> </nav>
Advertisements