Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML Build a Simple Website Creating a Website Structure Using Classes

Werner Preller
Werner Preller
582 Points

Multiple classes tag

I can't figure this out? "Add Container and Clearfix class."

<body>
  <div class="container" class="Clearfix">
   <div id="featured-cupcake">
    <h2>Cupcake of the Week</h2>
    <img src="img/featured-cupcake.jpg">
  </div>
 </div>
</body>
</html>

Does not work...? Any thoughts

Werner Preller
Werner Preller
582 Points

/* .... <div class="container" class="Clearfix"> </div>

2 Answers

Marcus Tisäter
Marcus Tisäter
4,886 Points

This is how you add serveral classes

Let's say we have a H1 tag and we want to style it in CSS but I want to make it more "organized" in my css so I want to have more classes to style my h1 tag.

 <h1 class = "font color background"> Hello Treehouse Student! </h1>

Now I have 3 classes named

font color and background so in my CSS I could set the attributes needed. In this case you need to add a clearfix class and a container class