Introduction

CSS stands for Cascading Style Sheets.

CSS describes how HTML elements should be displayed on screen, paper, or other media.

CSS is used to control the appearance, layout, spacing, colors, and typography of web pages.

color: red;
CSS Syntax

A CSS rule consists of a selector and a declaration block.

The selector points to the HTML element you want to style.

A declaration contains a property and a value.

h1 { color: blue; } p { font-size: 16px; }
Selectors Types

CSS selectors are used to find or select the HTML elements you want to style.

There are several types of selectors in CSS:

p { color: black; }
Box Model

All HTML elements can be considered as boxes.

The CSS box model includes content, padding, borders, and margins.

margin: 10px; padding: 15px;
Responsive Design

Responsive web design makes web pages look good on different screen sizes and devices.

Media queries can be used to apply different styles depending on the screen size.

@media (min-width: 768px) { .container { width: 80%; } }