<div align="">

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O
Type

The align attribute of the DIV element specifies the horizontal text alignment in a section.


<div align="center">centering text</div>

Attribute Value Explanation
align=" " left aligns to the left
center aligns to the center
right aligns to the right

The use of this attribute is deprecated. (Use CSS instead)

Example


<div align="left">Aligns to the left</div>
<div align="center">Aligns to the center</div>
<div align="right">Aligns to the right</div>

Output
Aligns to the left
Aligns to the center
Aligns to the right