Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Code Editor
Web Browser

Text Alignment

No matter how much styling is applied to text (typeface, size, weight, etc.), text always appears on the left side of the browser.

To move, or align, text, we can use the text-align property.

h1 { text-align: right; }

The text-align property can be set to one of the following three values:

  1. left - aligns text to the left hand side of the browser.
  2. center - centers text.
  3. right - aligns text to the right hand side of the browser.

Later in the course, you'll learn exactly how the browser positions HTML elements by default, which will help you understand how the browser "aligns" text, since "align" is a relative term. For now, it's enough to know that text can be moved to the left, center, or right side of the web page.

Report a Bug
If you see a bug or any other issue with this page, please report it here.