Screen Printing

TUTORIALS » HTML / JavaScript » HTML essentials (guided tutorials)


Page 2 of 6

The <!DOCTYPE> declaration

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">

   <title>Title of the document</title>

   Contents of the document

The Document Type Definition—also known as the DTD or the
tag—is the section that tells your browser what type and version of HTML you are coding. In our case it is Transitional XHTML v1.0.

It's very important to start your document with the DTD declaration (at the very first line) or else the browser won't know which rules to use in order to process your HTML code.

From now on we will be using Transitional XHTML v1.0 in all of our exercises. There are two other DTD's allowed for XHTML—Strict and Frameset—but we won't be using them yet (actually, I barely ever use them).

To make it simple, just copy and paste
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
at the beginning of each XHTML document you create and you will be fine.

More pages of this tutorial → XHTML vs HTML  <123456>

Comments & Questions