DIGITAL MARKETING AGENCY

HELPING YOU BUILD YOUR BUSINESS STRONGER!

Have Multiple Classes
KENNETH ERVIN YOUNG
KENNETH ERVIN YOUNG
Kenneth Ervin Young is a Business and Digital Marketing Coach, a Full-Stack Website Developer, a Georgia Institute of Technology Electrical Engineer, a Husband, and a Father. Kenneth resides in Tampa, Florida, USA.
All Posts

How to: Have Multiple Classes

Here I will show you an example of how to define a tag with multiple different classes.

<'h2 class="city main">Example 1<'/h2>
<'h2 class="city">Example 2<'/h2>
<'h2 class="main">Example 3<'/h2>

(remove the single quotes)

Using the following examples, you can see that example 1 has 2 words in the class, unlike the other 2 examples. By doing this, it allows you to separate the two different classes. You can define class “city” and give it a background color of blue, but using the class “main,” you can define that specific example. For example, if you wanted to center the text or change the text color, you can define it with the “main” class.

SHARE THIS POST

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

RELATED POSTS