Usage of text-align property in CSS

JavascriptWeb DevelopmentFront End Scripts

The text-align property is used to align the text of a document. Possible values are left, right, center, justify.

Example

You can try to run the following code to implement text-align property:

<html>
<body>
<p style = "text-align:right;">
This will be right aligned.
</p>

<p style = "text-align:center;">
This will be center aligned.
</p>

<p style = "text-align:left;">
This will be left aligned.
</p>
</body>
</html>
Published on 13-Apr-2018 12:24:39