Sort the elements

Report a typo

Sort the elements in the correct order according to the following conditions:

  • .diamonds is a child of .collection;
  • #TheHopeDiamond is a descendant of .diamonds and .collection;
  • #TheHopeDiamond is an ancestor of <img>.

Note that in this task, the closing tags </div> are different to ensure that checking works correctly.

Put the items in the correct order
<div id="TheHopeDiamond">
<div class="diamonds">
</div> <!-- closing tag for .diamonds -->
<div class="collection">
<img src="diamond.jpg" alt="Nice diamond">
</div> <!-- closing tag for .collection -->
</div> <!-- closing tag for #TheHopeDiamond -->
___

Create a free account to access the full topic