4

I know that XHTML is intended to be an XML-valid document (e.g., all tags are closed like <br/>). However, HTML5 is certainly not this way. What "type" of document is it?

In other words: is there a name for a document which is "text and angle-bracket-enclosed tags with optional attributes, and which may optionally be closed"?

Robert Martin
  • 16,759
  • 15
  • 61
  • 87

1 Answers1

0

The HTML5 specification defines HTML5 as

an abstract language for describing documents and applications, and some APIs for interacting with in-memory representations of resources that use this language.

This abstract language can be transmitted using different concrete syntax

  • The first one is the HTML syntax associated with the text/html MIME type.

  • The second one is the XHTML syntax which is an application of XML associated with the application/xhtml+xml MIME type.

  • Another representation of this abstract language is the in-memory Document Object Model (DOM).

Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240