Version-//W3C//DTD XHTML 1.0 Transitional//EN
Elementdiv
Purposegeneric language/style container
DescriptionThis element identifies parts of a document. You put elements in a div element so that you can set their alignments. Note that you don't get new paragraphs just because of a div. Think of div as a grouping element.
Start tagRequired <div>
Attributes
NameTypeDefaultComment
align( left | center | right | justify )#IMPLIEDtext alignment
class CDATA #IMPLIEDspace-separated list of classes
dir( ltr | rtl )#IMPLIEDdirection for weak/neutral text
idID#IMPLIEDdocument-wide unique id
langNMTOKEN#IMPLIEDlanguage code (backwards compatible); language code as RFC3066
onclick CDATA #IMPLIEDa pointer button was clicked; script expression
ondblclick CDATA #IMPLIEDa pointer button was double clicked; script expression
onkeydown CDATA #IMPLIEDa key was pressed down; script expression
onkeypress CDATA #IMPLIEDa key was pressed and released; script expression
onkeyup CDATA #IMPLIEDa key was released; script expression
onmousedown CDATA #IMPLIEDa pointer button was pressed down; script expression
onmousemove CDATA #IMPLIEDa pointer was moved within; script expression
onmouseout CDATA #IMPLIEDa pointer was moved away; script expression
onmouseover CDATA #IMPLIEDa pointer was moved onto; script expression
onmouseup CDATA #IMPLIEDa pointer button was released; script expression
style CDATA #IMPLIEDassociated style info; style sheet data
title CDATA #IMPLIEDadvisory title; text used for titles
xml:langNMTOKEN#IMPLIEDlanguage code (as per XML 1.0 spec); language code as RFC3066
Content( #PCDATA | p | h1 | h2 | h3 | h4 | h5 | h6 | div | ul | ol | dl | menu | dir | pre | hr | blockquote | address | center | noframes | isindex | fieldset | table | form | a | br | span | bdo | object | applet | img | map | iframe | tt | i | b | u | s | strike | big | small | font | basefont | em | strong | dfn | code | q | samp | kbd | var | cite | abbr | acronym | sub | sup | input | select | textarea | label | button | noscript | ins | del | script )*
End tagRequired </div>
Referenced in applet blockquote body button center dd del div fieldset form iframe ins li map noframes noscript object td th
Example
SourceAppearance
<div align="center"
style="background-color: yellow; border: 10pt; border-style: dashed;">The space
station was abandoned.</div>
<div align="right"></div>
<div align="center">This was because of the damage.</div>
<div align="justify">The station had low power, a damaged hull, and suffered
frequent fires. Air fans inside the station were faulty, oxygen bottles leaked,
and computer circuits were damaged because of the fires. The entrance door
didn't close completely, the insulation was cracked, and most of the solar
panels were missing. But the radio worked fine.</div>
The space station was abandoned.
This was because of the damage.
The station had low power, a damaged hull, and suffered frequent fires. Air fans inside the station were faulty, oxygen bottles leaked, and computer circuits were damaged because of the fires. The entrance door didn't close completely, the insulation was cracked, and most of the solar panels were missing. But the radio worked fine.
Save this page to any social bookmarking site! Share · Search · Market · Directory
2015-11-01 · John December · Contact · Terms of Use © December Communications, Inc.