Getting Started Lesson 1 of 33
What Is CSS? An Introduction for Beginners
Learn what CSS is, what it does to an HTML page, and see the same page before and after CSS — your first step to designing websites.
If HTML is the skeleton of a web page, CSS is its clothes, haircut and makeup. HTML says "this is a heading, this is a paragraph, this is a list." CSS says "make the heading dark green and big, give the paragraph more space between lines, and put the list items side by side."
CSS stands for Cascading Style Sheets. A "style sheet" is a list of design rules. "Cascading" describes how the rules flow down and combine. You'll learn exactly what that means later in the course.
The same page, before and after CSS
Here is a simple page for a carinderia, with HTML only:
<h1>Karinderya ni Aling Rosa</h1>
<p>Lutong bahay, every day, 6 AM to 8 PM.</p>
<h2>Today's Menu</h2>
<ul>
<li>Adobong manok – ₱70</li>
<li>Sinigang na baboy – ₱85</li>
<li>Pinakbet – ₱55</li>
</ul>
<p><a href="#">Order through Messenger</a></p>
It works, but it looks plain: black text, white background, default font. Now here's the exact same HTML with a few lines of CSS added at the top:
<style>
body {
font-family: Arial, sans-serif;
background: #fff8ec;
color: #3b2a1a;
max-width: 480px;
margin: 20px auto;
padding: 0 16px;
}
h1 {
color: #b4372b;
border-bottom: 4px solid #f2b33d;
padding-bottom: 6px;
}
ul {
list-style: none;
padding: 0;
}
li {
background: white;
margin: 8px 0;
padding: 12px 16px;
border-radius: 10px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
a {
display: inline-block;
background: #0f5c4d;
color: white;
padding: 10px 18px;
border-radius: 999px;
text-decoration: none;
}
</style>
<h1>Karinderya ni Aling Rosa</h1>
<p>Lutong bahay, every day, 6 AM to 8 PM.</p>
<h2>Today's Menu</h2>
<ul>
<li>Adobong manok – ₱70</li>
<li>Sinigang na baboy – ₱85</li>
<li>Pinakbet – ₱55</li>
</ul>
<p><a href="#">Order through Messenger</a></p>
Not a single word of the content changed. Only the style did. Open the example with "Try it yourself" and change #b4372b to blue, or change border-radius: 10px to 0, and watch what happens.
What can CSS do?
- Colors and backgrounds — text colors, background colors, images and gradients
- Text — fonts, sizes, bold, spacing between letters and lines
- Spacing — the space inside and around every element
- Layout — putting things side by side, in columns, or in a grid
- Responsive design — different layouts for phones and laptops
- Effects — rounded corners, shadows, hover effects and animations
Why keep HTML and CSS separate?
In the early days of the web, people styled pages with HTML tags like <font color="red">. Every page had design mixed into the content, and changing the look of a whole website meant editing every single page.
CSS fixed that. You can write all your design rules in one file and link it to every page. Want to change the site's main color from green to blue? Change one line, and all 50 pages update. That's the main reason CSS exists.
The separation also means:
- The HTML stays clean and easy to read.
- The same content can look different on a phone, a laptop, or when printed.
- Pages load faster, because the browser downloads the style sheet once and reuses it.
Your first CSS rule
Here is one CSS rule. It makes every <h1> on the page red and centered:
h1 {
color: red;
text-align: center;
}
You'll learn how to read every part of this in the next lesson. For now, try it:
<style>
h1 {
color: red;
text-align: center;
}
</style>
<h1>Hello, CSS!</h1>
<p>This paragraph is not affected, because the rule only targets h1.</p>
What you need
Nothing new. CSS runs in the same browser as HTML. For the lessons, the editors on this site are enough. For your own projects, the same simple text editor you used for HTML (VS Code, Notepad, or even a phone app like Acode) works for CSS too.
Quick Quiz
Check what you learned. Walang grade ito, practice lang. 🙂
By Sir Reyel · Last updated 2026-12-04