CSS Property List
This page lists the CSS properties taught in the CSS course, in the order you meet them. Each row links to the lesson that explains it with live examples. Type in the search box to filter the list — for example "flex", "font" or "shadow".
CSS has hundreds of properties, but you'll use these few dozen almost every day. When you need something that isn't here, search for "CSS" plus what you want to do, for example "CSS rounded corners", and you'll usually find the property name quickly.
| Property | What it does | Lesson |
|---|---|---|
color | Text color | Colors |
background-color | Background color of an element | Colors |
opacity | See-through level of the whole element (0–1) | Colors |
background | Shorthand for all background properties | Backgrounds |
background-image | An image or gradient behind the element | Backgrounds |
background-size | cover, contain or an exact size | Backgrounds |
background-position | Where the background image sits | Backgrounds |
background-repeat | Whether the background image tiles | Backgrounds |
border | Width, style and color of the border | Borders |
border-radius | Rounded corners; 50% makes a circle | Borders |
outline | A line outside the border, used for focus rings | Borders |
margin | Space outside the border | Margin & Padding |
padding | Space inside the border | Margin & Padding |
width / height | Size of the box | Box Model |
max-width / min-height | Limits that keep boxes flexible | Box Model |
box-sizing | border-box makes width include padding and border | Box Model |
text-align | left, center, right or justify | Text |
text-decoration | Underline, line-through or none | Text |
text-transform | uppercase, lowercase or capitalize | Text |
line-height | Space between lines of text | Text |
letter-spacing | Space between letters | Text |
text-shadow | Shadow behind text | Text |
text-overflow | Show … when text is cut off | Text |
font-family | The typeface, with fallbacks | Fonts |
font-size | Size of the text | Fonts |
font-weight | Thickness: 400 normal, 700 bold | Fonts |
font-style | italic or normal | Fonts |
font | Shorthand for style, weight, size, line-height and family | Fonts |
cursor | Mouse pointer shape, e.g. pointer | Links & Buttons |
list-style | Bullet or number type, or none | Lists |
border-collapse | Single borders in tables | Tables |
display | block, inline, inline-block, none, flex or grid | Display |
visibility | Hide but keep the space | Display |
position | static, relative, absolute, fixed or sticky | Position |
top / right / bottom / left / inset | Offsets for positioned elements | Position |
z-index | Which positioned element is on top | Position |
overflow | What happens when content doesn't fit | Overflow & Float |
float / clear | Wrap text around an image | Overflow & Float |
object-fit | How an image fills its box (cover, contain) | Overflow & Float |
aspect-ratio | Keeps a box at a shape like 16 / 9 | Overflow & Float |
flex-direction | row or column | Flexbox Basics |
justify-content | Spacing along the main axis | Flexbox Basics |
align-items | Alignment on the cross axis | Flexbox Basics |
flex-wrap | Let flex items move to the next line | Flexbox Basics |
gap | Space between flex or grid items | Flexbox Basics |
flex | Shorthand for flex-grow, flex-shrink and flex-basis | Flexbox Items |
align-self / order | Alignment and order of one flex item | Flexbox Items |
grid-template-columns | The columns of a grid | Grid Basics |
grid-template-rows | The rows of a grid | Grid Basics |
grid-column / grid-row | Make an item span cells | Grid Basics |
grid-template-areas | Draw a layout with named areas | Grid Areas |
grid-area | Give an item an area name | Grid Areas |
place-items | Center items in grid cells | Grid Areas |
@media | Apply styles only on some screens | Media Queries |
clamp() | A value between a minimum and maximum | Responsive Design |
content | Text or shape for ::before and ::after | Pseudo-elements |
--name / var() | CSS variables | Variables |
calc() | Math with mixed units | Variables |
box-shadow | Shadow around a box | Gradients & Shadows |
linear-gradient() | A blend of colors in a line | Gradients & Shadows |
transform | Move, rotate, scale or skew | Transforms & Transitions |
transition | Animate a change smoothly | Transforms & Transitions |
animation / @keyframes | Animations that play by themselves | Animations |
accent-color | Color of checkboxes and radio buttons | Forms |
Reading a property name
CSS property names are usually plain English words joined by hyphens: background-color, font-size, text-align. If you can describe what you want ("I want to align the text"), you can often guess the property. Values are also plain words when possible: center, bold, none, auto.
Shorthand properties
Some properties are shorthands that set several properties at once: margin, padding, border, background, font, flex, transition and animation. They save typing, but remember that a shorthand also resets any part you leave out to its default value.