HTML and CSS Reference
The doctype for XHTML is:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
Finally, the doctype for HTML5 is much simpler than what was required for
HTML 4.01 or XHTML:
HTML5 documents should always be opened in standards mode because they are
based on the latest specifi cations for the HTML language.
You can learn more about standards mode and quirks mode by searching the Web for
examples of the differences between the two modes.
Unless you are work-
ing with a legacy page
that absolutely needs to
be compatible with old
browsers from the 1990s,
you should always
include a doctype and
put your browser in
Creating the Initial Document
Now that you've seen the basic structure of an HTML document, you are ready to begin
creating the sample Web page for Dave's Web site.
Creating the Basic Structure of an HTML Document
Enter the HTML tags
where doctype is the Document Type Declaration, and head content and body
content are the content of the document's head and body.
You can start creating Dave's Web page using a basic editor such as Windows
Notepad. Since Dave wants his document to be based on HTML5, you'll use the HTML5
doctype in your fi le.
To create the basic structure of an HTML document:
1. Start your text editor, opening a blank text document.
Trouble? If you don't know how to start or use your text editor, ask your instruc-
tor or technical support person for help. Note that some editors do not save files
in text file format by default, so check your editor's documentation to ensure that
you are creating a basic text document.