CSS Tutorial - CSS Syntax & Selectors

Unlock Premium Features: AI explanations (Hinglish), Indian voice & Videos
Sign Up Free

๐Ÿ“ CSS Syntax

๐ŸŒŸ CSS Rule Structure:

selector { property: value; }

Jaise: h1 { color: red; }

๐ŸŽฏ Parts of CSS Rule

Anatomy
h1 {
  color: blue;
  font-size: 24px;
}

/* selector = h1 */
/* property = color, font-size */
/* value = blue, 24px */

๐Ÿ“Š Types of Selectors

TypeSyntaxExample
Elementtagnamep { }
Class.classname.box { }
ID#idname#header { }
Universal** { }

โš ๏ธ Class vs ID:

Class (.) = Multiple elements
ID (#) = Sirf ek element (unique)

๐Ÿค– AI Tutor Unlock Karo!

Apni language mein coding seekho - Hindi, Marathi, Gujarati aur 10+ Indian languages mein!

  • Hinglish mein explanations
  • Real-life examples
  • Beginner-friendly
Free Signup Karo

Example

p { color: green; }
.text { font-size: 20px; }
#title { color: red; }