Junior JavaScript

What is a CSS class selector?

Targets elements with a specific class attribute.

Example:

.card { background-color: lightgray; }

<div class="card">Profile</div>

Follow me on LinkedIn:

Key Takeaway:

Classes are reusable; use them for consistent styling across elements.

More from JavaScript Tutorial

All questions for this course