Certain HTML elements will render correctly even if you overlook the closing tag.
Example
<html> <body> <p>This is a paragraph <p>This is a paragraph </body> </html> |
Nevertheless, it’s not advisable to depend on this behavior! Forgetting the closing tag may lead to unexpected outcomes and errors!
Empty elements in HTML have no content.
The <br> tag, which signifies a line break, is an example of an empty element that lacks a closing tag.
Example
<p>This is a <br> paragraph with a line break.</p> |
HTML tags are insensitive to case: <P> is equivalent to <p>.
While the HTML standard doesn’t mandate lowercase tags, C7S suggests using lowercase in HTML and mandates lowercase for more rigorous document types such as XHTML.