Some HTML elements will display correctly, even if you forget the end (or closing) tag, because closing tags are considered optional:
HTML file: | Displayed by browser: |
---|---|
<html>
<body> <p>This paragraph has NO end tag. <p>This paragraph HAS an end tag.</p> </body> </html> |
This paragraph has NO end tag. This paragraph HAS an end tag. |
![]() |
W A R N I N G ! Never rely on this! It could produce unexpected results or errors! Also, stricter versions of HTML (eg: XHTML) demand closing tags. |