Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A Document Type Declaration, or doctype for short, has traditionally been used to specify which particular flavor of markup a document is written in.
The doctype for HTML 4.01 looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Here’s the doctype for XHTML 1.0:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
They’re not very human-readable, but, in their own way, they are simply saying “this document is written in HTML 4.01,” or “this document is written in XHTML 1.0.”
You might expect the doctype declaring “this document is written in HTML5” would have the number five in it somewhere. It doesn’t. The doctype for HTML5 looks like this: