CSS Introduction
- CSS stands for Cascading Style Sheets
- Used for styling web page
- CSS describes how HTML elements are to be displayed on screen
CSS Syntax
- A CSS rule consists of a selector and a declaration block.
- Selector points to the HTML element you want to style.
- Declaration block is surrounded by curly braces.
- Declaration block contains one or more declarations separated by semicolons.
- Each declaration includes a CSS property name and a value, separated by a colon.
h1 {
color: red;
font-size: 26px;
}
h1
is the selector
color: red;
is the declaration.
color
is the CSS property name. red
is the property value