CSS Properties & Pseudo Classes

Home / CSS Properties & Pseudo Classes

CSS Properties

font-family
Sets the font family for your HTML element.

font-size
Sets the font size for your HTML element

color
Sets the font color for your HTML element

line-height
Sets the amount of height between lines of text, also commonly known as leading.

font-weight
Sets the font weight of your text.

font-style
Sets the style of your font to be normal, bold or italic through CSS

text-transform
Sets the text to be normal (upper and lowerase as types OR uppercase OR lowercase)

text-align
This is how you set your text to be left, center or right aligned

background-color
This is how you set the background color of your HTML element.

border
This is how you set a border around your HTML element.

border-radius
This is how you set your HTML element to have rounded corners through CSS3. W3Schools has a good post explaining how to do this.

width
This is how you set the width of an HTML element

margin
This is how you move an HTML element

padding
This is the amount of space inside the HTML element away from the edges of the element itself

float
We can float items left or right, this comes in handy when creating multiple column layouts

clear
We use this to end our CSS floats so content below the original float doesn’t add itself to the float.

text-decoration
This is used to style links to be underlines or to be none, meaning no underline.

CSS Pseudo Classes

:hover
This is the hover for our link state

:visited
This is the visited state for our links

:active
This is the currently active state for links