Align the text of a document with 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 align text:

<html>
   <head>
   </head>
   <body>
      <p style = "text-align:right;">
         Asia is a continent.
      </p>
      <p style="text-align:center;">
         Asia is a continent.
      </p>
   </body>
</html>
raja
Published on 13-Apr-2018 11:24:00
Advertisements