Solve problem "Nest Many Elements within a Single Div Element" online - Learn Python 3 - Snakify

Lesson: HTML5 and CSS

Nest Many Elements within a Single Div Element

The div element, also known as a division element, is a general purpose container for other elements.

The div element is probably the most commonly used HTML element of all. It's useful for passing the CSS of its own class declarations down to all the elements that it contains.

Just like any other non-self-closing element, you can open a div element with <div> and close it on another line with </div>.

Try putting your opening div tag above your "Things cats love" p element and your closing div tag after your closing ol tag so that both of your lists are within one div.

Nest your "Things cats love" and "Things cats hate" lists all within a single div element.


The content on this page is licensed under Attribution-ShareAlike 4.0 International. Original authors: freeCodeCamp, the content was modified.