[x3d-public] HTML5 Differences from HTML4 - W3C Working Group Note

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Sat Jan 19 15:36:21 PST 2019


Here is a helpful reference as we continue building X3Dv4 interoperability within HTML5.  Some relevant excerpts are copied here.

===================================================================================
HTML5 Differences from HTML4
W3C Working Group Note 9 December 2014
http://www.w3.org/TR/html5-diff/

Abstract. "HTML5 Differences from HTML4" describes the differences of the HTML5 specification from those of HTML4.

Table of Contents
1 Introduction
	1.1 Scope of This Document
	1.2 History of HTML
	1.3 Open Issues
	1.4 Backward Compatibility
2 Syntax
	2.1 Character Encoding
	2.2 The Doctype
	2.3 MathML and SVG
	2.4 Miscellaneous
3 Language
	3.1 New Elements
	3.2 New Attributes
	3.3 Changed Elements
	3.4 Changed Attributes
	3.5 Obsolete Elements
	3.6 Obsolete Attributes
4 Content Model
5 APIs
	5.1 New APIs
	5.2 Changed APIs
	5.3 Extensions to Document
	5.4 Extensions to HTMLElement
	5.5 Extensions to Other Interfaces
	5.6 Obsolete APIs
Acknowledgments
References

1 Introduction
1.1 Scope of This Document
This document covers the W3C HTML5 specification. It does not cover the W3C HTML5.1 specification or the WHATWG HTML standard. [HTML5] [HTML5NIGHTLY] [HTML]

1.2 History of HTML
HTML has been in continuous evolution since it was introduced to the Internet in the early 1990s. Some features were introduced in specifications; others were introduced in software releases. In some respects, implementations and Web developer practices have converged with each other and with specifications and standards, but in other ways, they have diverged.

HTML4 became a W3C Recommendation in 1997. While it continues to serve as a rough guide to many of the core features of HTML, it does not provide enough information to build implementations that interoperate with each other and, more importantly, with Web content. The same goes for XHTML1, which defines an XML serialization for HTML4, and DOM Level 2 HTML, which defines JavaScript APIs for both HTML and XHTML. HTML replaces these documents. [DOM2HTML] [HTML4] [XHTML1]

The HTML specification reflects an effort, started in 2004, to study contemporary HTML implementations and Web content. The specification:
1. Defines a single language called HTML which can be written in HTML syntax and in XML syntax.2. Defines detailed processing models to foster interoperable implementations.
3. Improves markup for documents.
4, Introduces markup and APIs for emerging idioms, such as Web applications.

1.3 Open Issues
See the "Status of This Document" section of the HTML5 specification.

1.4 Backward Compatibility
HTML is defined in a way that is backward compatible with the way user agents handle content. To keep the language relatively simple for Web developers, several older elements and attributes are not included, as outlined in the other sections of this document, such as presentational elements that are better handled using CSS.

User agents, however, will always have to support these older elements and attributes. This is why the HTML specification clearly separates requirements for Web developers (referred to as "authors" in the specification) and user agents; for instance, this means that Web developers cannot use the isindex or the plaintext element, but user agents are required to support them in a way that is compatible with how these elements need to behave for compatibility with Web content.

Since HTML has separate conformance requirements for Web developers and user agents there is no longer a need for marking features "deprecated".

===================================================================================
2.3 MathML and SVG

The HTML syntax allows for MathML and SVG elements to be used inside a document. An math or svg start tag causes the HTML parser to switch to a special insertion mode which puts elements and attributes in the appropriate namespaces, does case fixups for elements and attributes that have mixed case, and supports the empty-element syntax as in XML. The syntax is still case-insensitive and attributes allow the same syntax as for HTML elements. Namespace declarations may be omitted. CDATA sections are supported in this insertion mode.

Some MathML and SVG elements cause the parser to switch back to "HTML mode", e.g. mtext and foreignObject, so you can use HTML elements or a new math or svg element.

For instance, a very simple document using some of the minimal syntax features could look like:
   <!doctype html>
     <title>SVG in text/html</title>
   <p>
     A green circle:
     <svg> <circle r="50" cx="50" cy="50" fill="green"/> </svg>
   </p>

===================================================================================

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman


More information about the x3d-public mailing list