Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. CSS Basics to Advanced

Lesson 3 of 50 · css

Basic Selectors

Duration: 10 mins

Selectors let you pick elements.

SelectorMeaning
*All elements
pAll <p> elements
.classElements with class="class"
#idElement with id="id"
element, element2Grouped selectors

Example

h1, h2 { color:#333; }

.button { background:#0066cc; color:#fff; }
Previous: Adding CSS to a PageNext: The Cascade & Specificity