1. What is CSS?
CSS stands for Cascading Style Sheets. It is used to describe the presentation and design of web pages, allowing you to control the layout, colors, and fonts of your site independently from the content (HTML).
2. Basic Syntax
A CSS rule-set consists of a selector and a declaration block.
h1, p).color) and a value (like blue), separated by a colon and ending with a semicolon.3. How to Add CSS to HTML
There are three primary ways to insert a stylesheet:
style attribute directly inside an HTML tag.<style> element within the <head> section of an HTML document..css file using the <link> tag in the <head>. This is the most efficient method for managing large websites. 4. Key Benefits
h1 {
color: blue;
font-size: 20px;
}