Text Alignment

h1 {
  text-align: center;
}

h2 {
  text-align: left;
}

h3 {
  text-align: right;
}

div {
  text-align: justify;
}
  • Is used to set the horizontal alignment of a text.
  • A text can be left or right aligned, centered, or justified.
  • When the text-align property is set to "justify", each line is stretched so that every line has equal width, and the left and right margins are straight (like in magazines and newspapers).

Text Alignment — Structure map

Clickable & Draggable!

Text Alignment — Related pages: