What is Div tag in html and css with examples?
< Div > tag stands for the division tag or the partition tag.
- Div tag or attribute is used to design the web pages.
- The main purpose of div tag is to divide the articles or web page into different parts.
- It works like a container , divide the article into section.
- Same as paragraph <p> attribute ,work as the partition of article.
- Thus, div tag divide the article into many parts as we like such as up ,down ,left or right.
- We can use div tag before the start of paragraph tag or before heading tag of paragraph.
- In div tag we use a SIMPLE code of CSS.
- lets see practice of div attribute in html and CSS code.
<head>
<title>use of div tag in html to design webpage.
</title>
</head>
<body>
<div style="border:4px red; background-color:pink;">
or
<div style="color:blue;">
<h1>use of div tag</h1>
<p>
In div tag we use a SIMPLE code of CSS.DIV tag or attribute is used to design the web pages.
The main purpose of div tag is to divide the articles or web page into different parts.
It works like a container , divide the article into section.
Same as paragraph <p> attribute ,work as the partition of article.
</P>