HTML <div> align Attribute (original) (raw)

Last Updated : 12 Jul, 2025

The HTML

align attribute was used to specify the horizontal alignment of content within a
element. However, this attribute is no longer supported in HTML5. Today, we use CSS for alignment purposes.

**Note: This attribute is not supported by HTML5.

**Syntax

**Attribute Values

Attribute Values
**left Aligns the content to the left.
**right Aligns the content to the right.
**justify Centers the content. This is the default value.
**center Justifies the content, which means it adjusts the spacing between words to align the text evenly along both the left and right edges.

Different Examples of HTML
align Attribute

**Example 1: In this example, we will see the implementation of the above tag with an example.

html `

HTML align Attribute

GeeksForGeeks

align Attribute

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

`

**Output : Example 2: In this example, we will see the implementation of above tag with an example.

HTML `

HTML align Example