Skip to content

Latest commit

 

History

History

05-class-selector

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
tutorial

05 Class Selector

There are many ways to select HTML elements to apply styles to them, so far we have only used the tag selector, so let's talk about the .class selector:

.class Selector

It is the most popular CSS selector, you will probably use it every 5 minutes.

Use the class property of the HTML element to select it. Styling rules will apply to all elements with the same class value

.small{
    font-size: 9px;
}

Any HTML tag with the class="small" will have a font-size of 9px.

📝 Instructions:

  1. Right now there is a class selected on the CSS that is called b-blue.

  2. Please apply that class to both of the HTML <p> tags.