Bookmarks for March 8th through March 20th

These links I have added to my pinboard.in account for March 8th through March 20th:

Enhanced by Zemanta

What is the HTML !DOCTYPE Tag ?

What is it?

When you start coding HTML to create web pages you quickly learn about the DOCTYPE command. This is always the first line of a HTML file but what is this line and what is it’s purpose.

The DOCTYPE command tells the browser loading the HTML file what version of HTML is being used and how the browser should handle it. For example some versions of HTML are more strict regarding how the code is presented compared to other and do not allow errors.

Choosing the correct DOCTYPE is very important. Currently the main versions of HTML are version 4.01 and version 5 however as of March 2012 HTML5 is still under development and should be used with caution as tags can change from time to time (Recently the time attribute was removed from the HTML5 specification and following complaints throughout the internet has been reinstated)

Defining the DOCTYPE tag

The DOCTYPE tag is defined in a similar way to all other tags.

There are three versions of the HTML 4.01

  • Strict – This version has all HTML elements but does not allow for presentation or depreciated tags. New pages should be created using this
  • Transitional – This version allowed for upgrading from older versions and allowed presentation and depreciated tags.
  • Frameset – Similar to Transitional but included the ability to create framesets as part of laying out pages and sites.

As part of trying to update the HTML code the XHTML Specification was created.  This was based on XML and while it was similar in many ways to HTML it allowed for creation of modules it’s code was less error tolerant. For example XHTML is case sensitive when dealing with tags. Like HTML it comes in three versions

Finally the process of creating the DOCTYPE command for HTML5 has been greatly simplified as you can see below.

In my opinion when learning HTML initially HTML 4.01 transitional should be used to allow a comparison between some depreciated tags and styling methods for modifying appearance (e.g. using the style option instead of the font attribute to change font styling options)

DOCTYPE codes

4.01 Versions

Strict
[HTML]< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">[/HTML]
Transitional
[HTML]< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">[/HTML]
Frameset
[HTML]< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">[/HTML]

XHTML Versions

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

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

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

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

HTML5

[HTML]< !DOCTYPE html>[/HTML]

Bookmarks for March 5th through March 8th

These are my links for March 5th through March 8th:

Bookmarks for March 4th from 09:54 to 20:18

These are my links for March 4th from 09:54 to 20:18: