Separate closing tags?

Why does the on line 10 of the Build a Bookstore Page require a separate closing tag? During my initial test, the code seemed to pass without it. I thought functioned like a void element. How can I tell which elements need an explicit closing tag and which ones don’t?

void elements don’t need a closing tag, all others do
there are specific cases, like a li element could not need a closing tag even if it’s not void, but better add it to avoid wrong nesting

if you have more specific questions can you post the code you are asking about?