HTML Alignment
This article tells you how to align a text or a container to various positions. We can align them directly in HTML code otherwise we can create a separate CSS file to do so.
Align Left
<style>align-contents:left;</style>
Set the align attributes value as left to align contents to the left.
Align Right
<style>align-contents:right;</style>
Set the align attributes value as right to align contents to the right.
Align Center
<style>align-contents:center;</style>
Set the align attributes value as center to align contents to the center.
Text Align Center
<style>text-align: center;</style>
Set the value of the text-align attribute as center to align text to the center.
Text Align Right
<style>text-align:right;</style>
Set the value of the text-align attribute as right to align text to the right.
Text Align Left
<style>text-align:left;</style>
Set the value of the text-align attribute as left to align text to the left.
Align Attribute
align=”justify”
Justify adds space between words so that the edges of each line are aligned with both margins.
align=”center”
Aligns the tag to the center.
align=”right”
Aligns the tag to the right.
align=”left”
Aligns the tag to the left.
Thank you for Reading!!