Chapter
Styling and layout
<p>Connect a stylesheet, understand the cascade, and create layouts that adapt rather than overflow.</p>
Lessons
-
CSS selectors and the cascade
Select elements with type, class, and ID selectors and reason about competing declarations.
-
The box model and spacing
Use content, padding, border, and margin to reason about element size and spacing.
-
Typography, color, and readable contrast
Choose readable fonts, line lengths, and color combinations for a comfortable page.
-
Flexbox and grid layouts
Choose Flexbox for one-dimensional alignment and Grid for two-dimensional page layouts.