Lessons

Lesson 4: Aligning text

... You've learned about the font-size and font-family properties and the color and background-color properties. Now you'll learn about the last core property in Font Tester: text-align.

The CSS text-align property has this format:
property: value;

It can have one of four values:

  • left (the default)
  • center
  • right
  • justify

Here are the four ways this CSS property can be configured:

  • text-align:left;
  • text-align:center;
  • text-align:right;
  • text-align:justify;

In Font Tester, the default text alignment for its columns is justify.

Practice
  • Left-align the text in Column 1
  • Center the text in Column 2
  • Right-align the text in Column 3

In Column 1, click Enter Text and type several paragraphs. Click OK. Your Column 1 text should look like this:

Column 1 with all settings

Click Get CSS Code. Your code should match this:

CSS code

Please comment on Lesson 4


Next lesson

Lesson index