What is CSS?
CSS HTML ki appearance badalta hai: colors, fonts, spacing aur layout. Pehle element select karein, phir property aur value likhein.
HTML content banata hai; CSS uska look aur layout set karta hai.
HTML gives content. CSS gives it a design.
CSS = Cascading Style Sheets. CSS browser ko batati hai ki HTML ka content kaisa dikhna chahiye—colour, font, spacing, border, background aur layout.
HTML
Structure & meaningHeading, paragraph, image aur button banata hai.
<h2>Study Club</h2>CSS
Appearance & layoutUn elements ka colour, size aur position set karta hai.
h2 { color: blue; }JavaScript
BehaviourClick par menu kholna ya content update karna.
button.addEventListener(...)Same HTML. Try adding the CSS.
Button dabayein: content same rahega, design badlega.
Study Club
Learn one new idea every day.
<section class="study-card">
<h2>Study Club</h2>
<p>Learn one new idea every day.</p>
<button>Explore courses</button>
</section>.study-card {
padding: 28px;
border-radius: 18px;
background: #eff6ff;
}
.study-card h2 { color: #2563eb; }Heading ka colour badalna hai. Kaunsi technology use hogi?
Detailed explanation & examples
Compare each visual with the code directly below it.
What is CSS?
CSS (Cascading Style Sheets) is the language we use to style web pages. It's the artistic palette that brings HTML to life, controlling layout, colors, fonts, spacing, and more.
Styling
Define colors, fonts, and visual appearance of elements
Layout
Control positioning and arrangement of elements
Responsive Design
Create layouts that adapt to different screen sizes
Animations
Add dynamic effects and transitions
Try a complete example
<h1 id="title">Learn CSS</h1>
<p class="highlight">Style this paragraph.</p>
<div class="demo card">A content box</div>
<ul><li>One</li><li>Two</li><li>Three</li></ul>Open the compiler to change the code and experiment with the result.