Margins, Indentations, and Alignments

These are the properties you use to work with margins, indentations, and alignments:

  • line-height— Indicates the height given to each line. Set this to an absolute measurement or a percentage value, such as 200% to create double spacing.

  • margin-left— Sets the left margin of a block element.

  • margin-right— Sets the right margin of a block element.

  • margin-top— Sets the top margin of a block element.

  • text-align— Sets the alignment of text. You can set this to left, right, center, or justify.

  • text-indent— Sets the indentation of the first line of block-level elements. Set this to an absolute value such as 10 pixels, 10px, or 4 points, 4pt.

  • vertical-align— Sets the vertical alignment of text. You can set this to baseline ...

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.