Styling Text

At this stage, you should use element selectors to “point” to structural text elements, like h1, p, or lists. This will style all elements of that type cohesively.

Coloring Text

Backgrounds are not the only element that can hold a color value. Likewise, you can color text using the color property. Again, color names are a great way of stating color values at this stage.

HTML
  h1{
    color: red;
  } 

Centering Text

Additionally, you can align text using text-align property. By default, browsers align text to the left of the screen; to center text on the page, simply add “center” to the property.

HTML
  h1{
    text-align: center;
    } 

Example

See how you can creatively style text using color and text-align: center!