CSS is used to style and format web pages by controlling elements such as layout, colors, fonts, and animations.
Developed by: Håkon Wium Lie.
Year of development: 1994.
Current version: CSS3, which introduces new features such as animations, flexbox, and grid.
What is CSS?
CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation of a web page.
It controls the layout, colors, fonts, spacing, and responsiveness of HTML elements.
It separates content (HTML) from design (CSS), making web pages more flexible and maintainable.
Why Use CSS?
Enhances Website Appearance – Controls fonts, colors, spacing, etc.
Improves User Experience (UX) – Creates responsive and interactive designs.
Reduces Code Repetition – A single CSS file can style multiple HTML pages.
Ensures Consistency – Maintains a uniform design across an entire website.
Speeds Up Page Load Time – External CSS reduces HTML file size, improving performance.
CSS Syntax
Basic Structure
selector {
property: value;
}
🔹 selector → Targets an element (e.g., p, h1, .class, #id).
🔹 property → Defines what to change (e.g., color, font-size).
🔹 value → Specifies the effect (e.g., red, 16px).