The Syntax of HTML

<!DOCTYPE html> <html> <head> <title>Example Page<title> <meta charset=utf-8> <link href=style.css rel=stylesheet> <script src=script.js></script> <!-- Comment --> </head> <body> ... </body> </html>

Converting HTML into a DOM

The DOM is the in-memory representation of the page, produced by parsing the HTML code.

In the DOM, there are no tags, only elements, and it is strictly a tree.

Most of HTML is defined in terms of the DOM - the syntax of HTML is only relevant to parsing.

The HTML Language

<!DOCTYPE html> ...