How to Use CSS3’s Text-Align Property

CSS3’s text-align property defines how text should be horizontally aligned in relation to its parent element. You can use it to align text left (this is the default value), center, or right.

Screen Shot 2016-10-30 at 2.50.50 PM

Join us in our newest publication:

The default value (text-align: left) is shown above. Here’s how you would center align text:

  1. p{
  2. text-align: center;
  3. }

Screen Shot 2016-10-30 at 2.50.18 PM

To align your text to the right, use the following code:

  1. p{
  2. text-align: right;
  3. }

Screen Shot 2016-10-30 at 2.51.09 PM

 

Share and Enjoy !

0Shares
0 0