Div XHTML tag


Div Transitional   Strict
<div></div> tags example tags example
Must contain in opening tag ---------------------- ---------------------- ---------------------- ----------------------
Must not
contain in
opening tag
span="" 
name="" 
<div span="txt">
<div name="txt">
As Transitional
As Transitional

align="left"
align="center"
align="right"
align="justify"



<div align="left"></div>
<div align="center"></div>
<div align="right"></div>
<div align="justify"></div>
Can contain
in opening tag
id=""
class=""
title=""

align="left"
align="center"
align="right"
align="justify"

Pass Transitional  Validation
<div id="text"></div>
<class="blue"></div>
<title="blue"></div>

<div align="left"></div>
<div align="center"></div>
<div align="right"></div>
<div align="justify"></div>

As Transitional
As Transitional

Fail Strict Validation


Must contain
between tags
Text 
or non-breaking space
<p>Text</p>
<p>&nbsp;</p>
As Transitional  
Can contain
between tags
<div>, <span>,
<table>, <p>, <br />, 
<hr>, <em>, <strong>, 
<h1 to h6>,<a>,  <img>,
  As Transitional  
Must not contain
between tags
       
Must not be
contained in
<table>, <h1-6>, <p>,
<ul>, <ol>,<span>
  As Transitional  
Can be
contained in
<div>   As Transitional