This section shows how CSS properties style HTML elements and how selectors target them.
This paragraph uses 16px (px)
This paragraph uses 1em
This paragraph uses 1rem
Example of custom font, size and image styling.
Headings and paragraphs use font-family, font-size and color.
Paragraph example with font-family Arial, color #333, size 1.1rem
Using padding creates space inside elements, margin creates space outside and border adds a visible outline.
Sizes use px, em, and rem units for fixed or relative spacing.
Flexbox allows items to align, distribute space and wrap responsively.
Grid creates rows and columns, placing items precisely in a flexible layout.
Using media queries, the layout and font sizes adjust for tablets and mobile devices.
Flex and grid layouts also adapt to smaller screens automatically.