The <div> tag is very important for creating a web page. It is very easy to use, and once you understand how to use a <div>, you can easily create any type of website.
A <div> is a box that helps organize and group content on a web page. It doesn’t have any special meaning, but it is used to divide sections and apply styles.
Why Use <div>?
<div>
<h2>Welcome to My Website</h2>
<p>This is a simple example of using a div.</p>
</div>
A web page is divided into three parts:
These three parts are mostly used to help divide and manage all the content effectively.
Header
The header is the top section of a web page. It usually contains:
Main
The main section is where the primary content of the page appears. It can include:
Footer
The footer is the bottom section of a web page. It usually contains:
An ordered list (<ol>) displays items in a specific order, like numbers or letters.
The <li> (list item) tag is used to add items inside the list.
Example of an Ordered List(<ol>)
<ol>
<li>Kuldip</li>
<li>BharatVibrant</li>
</ol>
This will display:
Unordered List (<ul>)
A <ul> (unordered list) does not use numbers or letters.
Instead, it displays bullets (dots) or icons before each item.
The <li> tag is used to add items to the list.
<ul>
<li>Kuldip</li>
<li>BharatVibrant</li>
</ul>
This will display:
The <nav> tag is used to create a navigation menu on a webpage. It contains links to different sections or pages
<nav>
<ul>
<li><a href=”home.html”>Home</a></li>
<li><a href=”about.html”>about</a></li>
<li><a href=”contact.html”>contact</a></li>
</ul>
</nav>
Post Comment