LMaW/DOCTYPE

From Create Your Own Story

So, we can start with DOCTYPE.

As I mentioned before, this says what kind of document we have.

First, we can start with the basics.

Capitalization: For DOCTYPE, we do not need to worry about if words/letters are capital or not.

<!DOCTYPE html> = <!DOCTYPE HTML> = <!doctype html> = <!Doctype Html>

All of these are the same.

Now, there are many types of doctypes:

  • HTML 5
    • <!DOCTYPE html>

  • HTML 4.01 Strict
    • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

  • HTML 4.01 Transitional
    • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

  • HTML 4.01 Frameset
    • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

  • XHTML 1.0 Strict
    • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

  • XHTML 1.0 Transitional
    • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  • XHTML 1.0 Frameset
    • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

  • XHTML 1.1
    • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

What do these mean? Without going more in depth, it is hard to describe. The best thing is to just use the HTML 5 type, since it is easy to type and should work with all modern browsers.

In this case, you will use

<!DOCTYPE html>
Personal tools