CSS Properties
Property | Description | Example |
---|---|---|
color | The color CSS property sets the foreground color value of an element's text and text decorations. | color: rebeccapurple; |
background-color | The background-color CSS property sets the background color of an element. | background-color: brown; |
font-family | The font-family allows you to specify a font (or list of fonts) for the browser to apply to the selected elements | font-family: arial; |
font-size | The font-size property can take values measured in px, em, rem and percentages and changes the size of text | font-size: 12px; |
font-style | The font-style is used t oturn italic text on or off. | font-style: italic; |
text-transform | The text-transform allows you to set your font to be transformed. Values include: none, uppercase, lowercase, capitalize, full-width | text-transform: uppercase; |
text-decoration | The text-decoration Sets/unsets text decorations on fonts (you'll mainly use this to unset the default underline on links when styling them). | text-decoration: overline; |
text-shadow | The text-shadow applies a drop shadow to the text and takes 4 values. | text-shadow: 4px 4px 5px red |
text-align | The text-align property is used to control how test is aligned within its containing box. | text-align: center; |
line-height | The line-height property sets teh height of each line of text. | line-height 1.6; |
letter-spacing and word-spacing | The letter-spacing and word-spacing allow you to set the spacing between letters and words in your text. | letter-spacing: 4px; |
text-overflow | The text-overflow sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('...') or disaply a custom string. | text-overflow: clip; |