Code Worked - Several Ways


#1

My code below worked. Please know that it also worked when I did the two div with just plain tags like the following <div> and </div>. I therefore have two questions.

  1. Can I have two divs named grouping (with corresponding second container inner) in one webpage?
  2. Is it appropriate to declare div <div> and </div> without giving it the class="name chose"> followed by the inner container div?

Thanks for the clarification. I cannot tell if my original code which went through as approved was missing critical elements.

<div class="grouping">
    <div class ="container>"
  <h3>Host</h3>
  <p>Renting out your unused space could pay your bills or fund your next vacation.</p>
  <p>
    <a href="#">Learn more about hosting.</a>
  </p>
  </div>
</div>

<div class="grouping">
    <div class="container"></div>
  <h3>Trust and Safety</h3>
  <p>From verified ID to our worldwide customer support team, we've got your back'.</p>
  <p>
    <a href="#">Learn about trust at Airbnb</a>
  </p>
  </div>
</div>

#2

As long as use use Classes, not IDs, then yes.

No idea :wink: