abbr.diverse different;divide separate;divided division;division division
html div tag syntax
Function:Define the partition or section (division/section) in the document.
Description: <div> is a block-level element. This means that its contents automatically start on a new line. In fact, line breaks are the only formatting behavior inherent to <div>. Additional styles can be applied via the <div>'s class or id. It is not necessary to add a class or id to every <div>, although there are certain advantages to doing so. It is possible to apply either class or id attributes to the same <div> element, but it is more common to apply only one or the other. The main difference between the two is that class is used for groups of elements (similar elements, or can be understood as a certain type of elements), while id is used to identify individual and unique elements.
Note: <div> tag can divide the document into independent and different parts. It can be used as a strict organizational tool and does not use any formatting associated with it. The <div> tag is supported by all major browsers.
html div tag example
<html> <body> <h3>This is a header</h3> <p>This is a paragraph.</p> <div style="color:#FF0000"> <h3>This is a header</h3> <p>This is a paragraph.</p> </div> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance