Introduction to CSS ek basic topic hai jo web development me use hota hai. Is Introduction to CSS me hum CSS ke basic concepts aur syntax ko samjhenge, jisse hum web pages ka layout aur appearance easily control kar sakte hain.
What is CSS?
CSS ek language hai jo hum web page ko style karne ke liye use karte hain.
-
CSS ka full form hai Cascading Style Sheets
-
Cascading Style Sheet batata hai ki HTML elements screen, paper ya dusre media me kaise display honge
-
Yeh bahut kaam bachata hai. Ye ek hi time me multiple web pages ka layout control kar sakta hai
-
External stylesheets CSS files me store hote hain
Why Use Cascading Style Sheets?
CSS ka use web pages ke design, layout aur different devices aur screen sizes ke hisaab se display ko define karne ke liye hota hai.
Example:

CSS Saves a Lot of Work!
Cascading Style Sheet definitions normally ek external .css file me save hote hain.
External stylesheet file ke through, tum sirf ek file change karke poori website ka look change kar sakte ho.
Syntax for CSS
Ek CSS rule me ek selector aur ek declaration block hota hai.

Selector
Selector batata hai kaunsa HTML element style karna hai.
Declaration block
Isme ek ya zyada declarations hote hain jo semicolons (;) se separate hote hain.
Har declaration me ek CSS property aur uski value hoti hai, jo colon (:) se separate hoti hai.
Multiple CSS declarations semicolons se alag hote hain aur declaration block curly braces {} ke andar hota hai.
Example
Is example me sabhi <p> elements center aligned honge aur unka text color red hoga:

Example Explained:
-
p ek selector hai (ye
<p>HTML element ko target karta hai) -
color ek property hai aur red uski value hai
-
text-align ek property hai aur center uski value hai