2.3. HTML Tag

The HTML tag (<html>) is the tag that indicates the beginning and end of an XHTML document. Your documents should always begin with the opening HTML tag (<html>) and end with the closing HTML tag (</html>).

A variety of browsers (including Microsoft's Internet Explorer) correctly handle documents that are missing one, or both, of these tags. However, you should never count on your audience using a particular user agent or browser and should therefore strive to always write standards-compliant code.

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.