What is CSS?
CSS stands for Cascading Style Sheets. It controls how HTML elements look — colors, fonts, spacing, layout, and more.
HTML is the structure. CSS is the design.
<!-- HTML -->
<p>Hello, World!</p>
<!-- CSS -->
<style>
p {
color: red;
font-size: 24px;
}
</style>3 Ways to Add CSS
| Method | Where | Best for |
|---|---|---|
| Inline | style attribute on element | One-off overrides |
| Internal | <style> tag in <head> | Single-page styles |
| External | Separate .css file via <link> | All real projects |
<!-- External (recommended) -->
<link rel="stylesheet" href="style.css">Always use external CSS for real projects — it keeps HTML clean and lets you reuse styles across pages.