★ wanayoo — archive 1999 http://msdn.microsoft.com/workshop/Author/dhtml/reference/objects/DIV.aspNouvelle recherche | Portail wanayoo
MSDN Online Web Workshop   All Products  |   Support  |   Search  |   microsoft.com Home  
microsoft.com Home
  Home  |   Magazines  |   Libraries  |   Developer Centers  |   Resources  |   Downloads  |   Search MSDN
 
DIR Element | DIR Object     DL Element | DL Object     DHTML Objects    
Web Workshop  |  DHTML, HTML & CSS

DIV Element | DIV Object


Specifies a container that renders HTML.

HTML Syntax

<DIV
    ALIGN=CENTER | LEFT | RIGHT | JUSTIFY
    CLASS=classname
    DATAFLD=colname
    DATAFORMATAS=HTML | TEXT
    DATASRC=/old?u=http%3A%2F%2Fmsdn.microsoft.com%2Fworkshop%2FAuthor%2Fdhtml%2Freference%2Fobjects%2F%3C%2FB&y=1999>#ID
    ID=value
    LANG=language
    LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT  | VBS 
    STYLE=css1-properties
    TITLE=text
    event = script
>

Remarks

The DIV element is a block element and requires a closing tag.

This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script as of Internet Explorer 4.0.

Members

Styles

Example

This example uses two DIV elements to align two sections of text differently.

<DIV>
This text represents a section.
</DIV>

<DIV ALIGN=CENTER>
This text represents another section, and its text is centered.
</DIV>