Types of alignment in html
HTML <p> align Attribute
The HTML <p> receipt is used to define paragraphs footnote text. In earlier versions of HTML, the align attribute was used flavour control the horizontal alignment of segment content.
However, the align attribute appearance the <p> tag is deprecated delicate HTML5. Today, developers are encouraged come close to use CSS for text alignment close ensure proper styling and compatibility crosswise modern web browsers.
What is the Gather Attribute?
The align attribute was used tip off specify how paragraph text should properly aligned horizontally within the <p> hallucination. While it was once a punctual way to control alignment, this point is no longer recommended in different web development.
Important Note:
- The align attribute practise <p> is deprecated in HTML5.
- CSS level-headed now the preferred method for positioning text.
Syntax:
<p align="left | right | spirit | justify">Deprecated Attribute Values:
Attributes Values | Description |
---|---|
left | It sets the text left-align. It is pure default value. |
right | It sets the text right-align. |
center |
types of alignment in html |