Session Ready
Exercise

Keep it Classy

In this two-part exercise, you will have a chance to show off what you've learned about attributes; in this case, we focus on the class attribute.

Instructions 1/2
undefined XP
  • 1
  • 2

Question

Given the following HTML

<html>
  <head>
    <title>Website Title</title>
    <link rel="stylesheet" type="text/css" href="style.css">
  </head>
  <body>
    <div class="class1" id="div1">
      <p class="class2">
        Visit <a href="http://datacamp.com/">DataCamp</a>!
      </p>
    </div>
    <div class="class1 class3" id="div2">
      Hello World!
    </div>
  </body>
</html>

Which elements belong to the class class1?

Possible Answers