CSS syntax means choosing some parts of the HTML (like headings, text, or buttons) using a selector.
Then, you apply styles using properties such as color, size, or spacing.
These styles decide how things will look on the webpage.
Using this method makes the page neat, easy to read, and more beautiful.
Syntax:
selector { property: value; }
Where:
- selector → HTML element (e.g., p, h1, div)
- property → Style attribute (e.g., color, font-size)
- value → The value assigned to the property (e.g., blue, 18px)
Example:
p { color: blue; font-size: 18px; }
All<p> (paragraph) elements will appear in blue with 18px font size.