Possible Duplicates:
What are all the valid self-closing tags in XHTML (as implemented by the major browsers)?
Are (non-void) self-closing tags valid in HTML5?
Why do browsers think this <div/> tag isn't immediately ended?
can someone please explain why this happens?
.lineBreak10
{
height: 10px;
}
<div class="lineBreak10"/> –> does not work
<div class="lineBreak10"></div> –> works
Because HTML isn’t XML.
While HTML looks a lot like XML, it is actually a completely separate thing, not bound by the same rules.
If you use XHTML, served as XML to the web browser, self-closing elements not working is a bug, but if you serve a document as HTML, all rules that relate to XML and HTML’s similarities to same go out the window.