Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Build a Simple Website Creating a Website Structure Using Classes

How to write two classes?

When one needs to write two or more classes one after the other, can it be done under one line or does it need to be separated in two or more lines? this is in regards css grid system quiz...Also in that case can that <div class> be closed under one single</div>?

3 Answers

Tom Bedford
Tom Bedford
15,645 Points

I'm a bit confused by what you mean with the lines/separation.You can add all the classes you need inside one set of quote marks with a space between each.

<p class="one two">This paragraph has two classes, "one" and "two".</p>

Hope this helps!

Salmen Bejaoui
Salmen Bejaoui
8,017 Points

you put one or more classes in one single line , example class="first_class second_class third_class .....

Thanks for the tip I was able to get through