Course
CSS
Colors, sizes, and layout — shape how your page looks.
Start learning
What is CSS?
First steps7 lessons
More control over the look8 lessons
- 08Decorate "on target" with classes
class="note".note - 09Decorate text with bold and underlines
font-weighttext-decorationcolor: inherit - 10Align text to the center or right
text-align - 11Wrap it in a border
borderborder-bottomborder-left - 12Round the corners for a softer look
border-radius - 13Add a shadow to make it float
box-shadow - 14Lay an image in the background
background-imagebackground-sizebackground-repeatbackground-position - 15Manage colors in one place with CSS variables
:root--main-colorvar()
Size and the box model3 lessons
Arranging and positioning6 lessons
- 19Line things up with Flexbox
display: flexgapjustify-contentalign-items - 20Line things up in a Grid with Grid
display: gridgrid-template-columns1frgap - 21Layer and pin things with position
position: fixedposition: sticky - 22Layer things with relative and absolute
position: relativeposition: absolutez-index - 23Make it look good on phones too: media queries
@mediamax-width - 24Let's support dark mode
prefers-color-scheme@media