![]() |
A <div> tag is used to maintain CSS Style in the most cases.
The
The
The
Any sort of content can be put inside the
Note:
By default, browsers always place a line break before and after the |
Example:
HTML
<html>
<head>
<style>
.myDiv { border: 5px outset red; background-color: lightblue; text-align: center;
}
</style>
</head>
<body>
<div class="myDiv"> <h2>This is a heading in a div element</h2> <p>This is some text in a div element.</p>
</div>
</body>
</html>
Example:
HTML
<style>
div { display: block;
}
</style>
How to create HTML <div> Tag | HTML Tag |
What Type of Browsers will Support for HTML <div> Tag | HTML Tag |
How to set Default CSS Settings for HTML <div> Tag | HTML Tag |
Category
: |
Web Tutorial |
Sub Category
: |
HTML Tag |
Uploaded by
: |
Admin |
Read Article https://horje.com/learn/1434/reference