Home / Tutorial / HTML Navigation Mistakes Done By Web designers | HTML Nav Tag | HTML UL Tag

HTML Navigation Mistakes Done By Web designers | HTML Nav Tag | HTML UL Tag

There are different ways for creating navigation in HTML. Usually in HTML4 the web designers use the standard way for creating navigation was <ul> and <li> tag . But after the development of HTML5, there was a built-in tag for navigation. In this topic, we would be able to cover the difference of both HTML5 and HTML4. And how to create navigation in both of standards. What are the benefits of using <ul> <li>  and what are the benefits of using the <nav> tag which was developed in HTML5

 

 

 

How To Use UL Tag In HTML

<!DOCTYPE html>
<html>
<head>
<title> My First WebPage </title>
</head>
<body>

<ul>
   
      <li> First Item </li>
      <li> Second Item </li>
      <li> Third Item </li>


</ul>

</body>
</html>

 

In HTML UL tag is used for the unordered list. This code will show the results in the form of bullets and inside the ul there are three list items.If we want to show in the form of numbers for example list items should be shown in the form of list item we should use the <ol> tag in HTML

<!DOCTYPE html>
<html>
<head>
<title> My First WebPage </title>
</head>
<body>

<ol>
   
      <li> First Item </li>
      <li> Second Item </li>
      <li> Third Item </li>


</ol>

</body>
</html>

How To Use The Navigation Tag In HTML5

In HTML4 we use the standard <ul> tag in HTML for creating the navigation but in HTML5 there is a <nav> . HTML5 has many benefits over HTML4 but the main difference is there are built-in tags for each part of the structure. If we want to create the navigation in HTML5 We can do like this.

 

<!DOCTYPE html>
<html>
<head>
<title> My First WebPage </title>
</head>
<body>

<nav>
   
      <a href="#"> First Item </a>
      <a href="#"> Second Item </a>
      <a href="#"> Third Item </a>

</nav>

</body>
</html>

 

Do you need a Web Designer For Your Product?

Web Designer For Your Product

About tayyab_no_access

Check Also

Getting Started With HTML | How To Create A WebPage In HTML

Getting Started With The HTML. First, we need to understand what is HTML. HTML is

Leave a Reply

Your email address will not be published. Required fields are marked *