How to: Define A Class

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email

In order for you to define a tag and make it possible for you to edit it with css, you will need to define it with either an id or a class. Here i will show you how to define it with a class.

 

<h2 class=”city”>Class Definition</h2>

As you can see in the code ‘class=”city”‘, that will allow me to use the class “city” in css to edit what’s inside the tag. You can change the color of the text, the background color, and so much more!