HTML <div> Tag
This HTML<div> tag supports both the global and the event attributes.
Syntax: <div> Text </div>
The Div is the most usable tag in web development because it helps us to separate out data in the web page and we can create a particular section for particular data or functionality in the web pages.
- The div tag is Block level tag
- It is a generic container tag
- It is used to the group of various tags of HTML so that sections can be created and style can be Applied on them.
<!DOCTYPE html> <html> <body> <div style="background-color:lightblue"> <h3>tutorials.freshersnow.com</h3> <p>Learn all courses at any time, with lifetime access</p> </div> </body> </html>
Attributes that are supported by the <div> tag
|Describes the alignment of the content inside an element|