0Pricing
HTML for Kids · Lesson

Class Selector

Class Selector

1

Hello,

We came to class selectors, one of the most critical issues in CSS.

We know the class selector because we have used the class selector frequently until now.

In this lesson, let's both consolidate our knowledge and learn about its advantages over other selectors.

10

So let's start.

We use the dot (.) selector to define a class type selector. Below is a class selector named my-class and the font-size style is 10px; has been passed.

.my-class {

font-size: 10px;

}

We can also define more than one style for a class selector.

.my-class {

font-size: 10px;

}

← Back to HTML for Kids