ad

Saturday, November 1, 2025

how to create Top navigation menu

 how to create Top  navigation menu 

https://webdesigningtheory.blogspot.com


 The <nav> tag is  new element in  the html5 nav tag  use to define  the of the navigation link either within the current document or other documents. Example- nav tag is the  navigation blocks are menu tables  of contents, and indexes. One HTML document may contain several <nav> tags, for example, one for site navigation and one for intra-page-navigation 

.Note that not all links in the HTML document can be placed inside the <nav> element. it can only include major navigation blocks. For example, the <nav > tag is not placed in the <footer> tag for defining links in the footer of the website.

how to Create Top navigation menu 


Syntax: 

The <nav > tag comes pairs. written between the opening 

(<nav> ) and closing (</nav>) tags.


how to create top  navigation menu 

 program 

<!DOCTYPE html>

 <html>

<head>

<title>Title of the document</title>

</head>

<body>

<header>

<h1> how to create Top navigation menu </h1>

</header>

<nav>

<a href="Html.html">HTML</a>

| <a href="CSS.html">CSS</a> |

 <a href="javascript.html" > javascript </a> |

 <a href="/php.html"> PHP</a>

</nav>

<h2>Welcome to web designing theoryPublication</h2>

</body>

</html>


how to create  top navigation menu 

Explain program 

Step 1 ]

<!Doctype html>

  • <!doctype html>  always be the first line of any HTML document.

Step 2 ]

   <html> and </html>

   html  is the root element.

Step 3 ]

<body> and </body>

body  is  main content area.

All visible content inside to  the <body> tag

Step 4]

<header>

<h1>Programming Courses</h1>

</header>

<header>....</header>

<header> element  represents  top section 
header section includes
 website name
 logo
 heading or slogan

<h1>Programming Courses</h1>

Display a large heading  the top of the page 

Step 5]

<nav>....</nav>

<nav> tag use navigation section of your website 

 links use  menus or catagories

Step 6]

<nav>

<a href="Html.html">HTML</a>

| <a href="CSS.html">CSS</a> |

 <a href="javascript.html">JavaScript</a> |

 <a href="/php.html">PHP</a>

</nav>

<a>  tag create hyperlinks 

 href = html.html means link will open the file  

 vertical  bar use 

Step 7]

<h2>Welcome to web designing theoryPublication</h2>

<h2> is subheading = smaller than <h1>
context or welcome message to visitors
display bold

Step 8]

</html>


end HTML Document

how to create  top navigation menu 

 output 

navigation menu in html

Related Post :-

learn HTML link tag

html table cellpadding attribute

how to create checkbox in html