...

/

Text Alignment and Sizing

Text Alignment and Sizing

Learn how to manipulate a web page's text in detail.

Text alignment

By default, text elements are aligned to the left of their container. Use the text-align property to change the alignment of text within an element. text-align has four different values:

  • center: Center the text.
  • left: Align the text to the left of its container.
  • right: Align the text to the right of its container.
  • justify: The text will spread
...