HTML div align property
Browser Support
All major browsers support align attribute.
Definition and Usage
HTML5 no longer supported <div> align property, use CSS instead.
<Div> The align attribute in HTML 4.01 have been abandoned. in HTML 4.01.
align attribute specifies the <div> element contents of the horizontal alignment.
Compatibility Notes
HTML5 no longer supported <div> align property, use CSS instead.
CSS Syntax: <div style = "text-align: center">
CSS Example: to narrow the list row height
In our CSS tutorial you can find more information about the text-align attribute details.
grammar
<div align="left|right|center|justify">
Property Value
value | description |
---|---|
left | Left-aligned content. |
right | Right-aligned content. |
center | Align content. |
justify | Extending rows so that each row can have equal length (as in newspapers and magazines). |
HTML <div> tag