Home >>HTML5 Tutorial >HTML5 <nav> Tag

HTML5 <nav> Tag

HTML5 <nav> Tag

The HTML <nav> tag is used to represent the navigation links in HTML documents. The purpose is to provide the navigational links which may points to other webpages or to different sections of same webpage. Inside a nav tag you can placed these links. Common examples of some navigational links are tables, contents, menus, and indexes, etc.

To create links within nav tag you have to code within an element ul list. This elements helps to create a navigation menu much easier and creates a neat horizontal menu of text links.

Let's take an Example of HTML <nav> tag:

<!DOCTYPE html> 
<html> 
<head> 
	<title>nav tag</title> 
	<style> 
		nav { 
			border:1px; 
			background-color:#090; 
			color:white; 
			padding:6px; 
		} 
		.php { 
			font-size:40px; 
			color:#090; 
			font-weight:bold; 
			text-align:center; 
		} 
		a { 
			text-decoration:none; 
			color:white; 
			font-size:20px; 
		} 
	</style> 
</head> 
<body> 
	<div class = "php">Phptpoint</div> 
	<nav> 
		<a href = 
"https://www.phptpoint.com/"> 
						HOME</a> | 
		<a href = 
"https://www.phptpoint.com/html-tags/"> 
					HTML</a> | 
		<a href = 
"https://www.phptpoint.com/css-tutorial/"> 
						CSS</a> | 
		<a href = 
"https://www.phptpoint.com/bootstrap-tutorial/"> 
				BOOTSTRAP</a> | 
		<a href = 
"https://www.phptpoint.com/javascript-tutorial/"> 
					JAVASCRIPT</a> 
	</nav> 
</body> 
</html>
Output: html5 nav tag

No Sidebar ads