selector {
property: value;
}
element
: Selects all elements of a specific type#id
: Selects an element with a specific ID.class
: Selects all elements with a specific classelement, element
: Selects multiple elementselement > element
: Selects a direct child elementelement + element
: Selects the next sibling elementelement ~ element
: Selects all sibling elementscolor
: Sets the color of textbackground-color
: Sets the background color of an elementfont-family
: Sets the font family of textfont-size
: Sets the font size of textfont-weight
: Sets the weight (boldness) of texttext-align
: Sets the horizontal alignment of texttext-decoration
: Sets the decoration of text (underline, etc.)padding
: Sets the padding of an elementmargin
: Sets the margin of an elementborder
: Sets the border of an elementwidth
: Sets the width of an elementheight
: Sets the height of an elementdisplay
: Sets the display style of an elementposition
: Sets the position of an elementz-index
: Sets the stacking order of elementspx
: Pixels%
: Percentagesem
: Relative to the font size of the elementrem
: Relative to the font size of the root elementvh
: Relative to the height of the viewportvw
: Relative to the width of the viewport