Properties

Last updated on

The margin property defines the outermost portion of the box model, creating space around an element, outside of any defined borders. Margins are set using lengths, percentages, or the keyword auto and can have negative values. Here’s an example: .box { margin: 0 3em 0 3em; } margin is a shorthand property and accepts up

Continue reading →

Last updated on

The list-style property is a shorthand property that sets values for three different list-related properties in one declaration: ul { list-style: || || ; } Here’s an example of the syntax: ul { list-style: square outside none; } Which would be the same as the following longhand version: ul { list-style-type: square; list-style-position: outside; list-style-image:

Continue reading →

Last updated on

The line-height property defines the amount of space above and below inline elements. That is, elements that are set to display: inline or display: inline-block. This property is most often used to set the leading for lines of text. p { line-height: 1.5; } The line-height property can accept the keyword values normal or none

Continue reading →

Last updated on

The letter-spacing property controls the amount of space between each letter in a given element or block of text. Values supported by letter-spacing include font-relative values (em, rem), parent-relative values (percentage), absolute values (px) and the normal property, which resets to the font’s default. Using font-relative values is recommended, so that the letter-spacing increases or

Continue reading →