<DIV> Tag & its Attribute
HTML Tag <DIV>
<DIV> Indicates logical divisions within a document. You can use these to apply alignment, linewrapping, and particularly Style Sheet attributes to a section of your document. <DIV ALIGN=CENTER> is the official replacement for the <CENTER> tag.
Attribute of <DIV> Tag
ALIGN
Specifies whether the contents of the section align with the left or right margins (LEFT, RIGHT), are evenly spaced between them (CENTER), or if the text stretches between the left and right margins (JUSTIFY).
<DIV ALIGN="RIGHT">
Cs-Tutorial.com</DIV>
<DIV ALIGN="LEFT">
Login Window</DIV>
Possible Values
LEFT, CENTER, RIGHT, JUSTIFY
CLASS
Indicates which style class applies to the <DIV> element.
<DIV CLASS="dkm">
Possible Values
Any Class Name.
DATAFLD
Selects a column from a previously identified source of tabulated data (see the DATASRC= attribute).
<DIV DATASRC="#data_table">
<DIV DATAFLD="name"></DIV>
</DIV>
Possible Values
Any Column name.
DATAFORMATAS
Indicates how tabulated data formats within the <DIV> element.
<DIV DATAFORMATAS="HTML"
DATASRC="#data_table">
Possible Values
TEXT, HTML, NONE
DATASRC
Specifies the source of data for data binding.
<DIV DATASRC="#data_table">
Possible Values
Data Source name.
ID
Assigns a unique ID selector to an instance of the <DIV> tag. When you then assign a style to that ID selector, it affects only that one instance of the <DIV> tag.
<DIV ID="dkm">
Possible Values
Any ID name.
NOWRAP
Disables line-wrapping for the section.
<HR>
<DIV ALIGN="LEFT" NOWRAP>
The contents of this section will not
automatically wrap as you size the window.
</DIV><HR>
Possible Values
NOWRAP
STYLE
Specifies Style Sheet commands that apply to the contents within the <DIV> tags.
<DIV STYLE="background: red">
Possible Values
CSS Property with value.
TITLE
Specifies text assigned to the tag. You might use this attribute for context-sensitive help within the document. Browsers may use this to show tool tips over the contents of the <DIV> tags.
<DIV TITLE="Title" CLASS="casual">
Possible Values
Any text Message.