text-align
To set the text alignment of inline contents.
Syntax
text-align: <text-align-value>;
The text-align-value
can be the following:
left
center
right
Example 1
Set the p
tag to center
:
p {text-align: center;}
The text in p
tag will be centered.
Contributors
- Anonymous contributors