HTML5 as a technology, has finally taken off around the world since its introduction in 2009 and is now the html web page development language of choice for leading web developers. HTML5 however is still a young technology and is still making inroads to become available on most websites, especially the large ones that have a wide user base. Hence more often than note, you will always pick up a website that leaves you wondering if its really an HTML5 website or a simply a website running Adobe Flash. So how do you identify the difference?
The key is in the <!DOCTYPE> declaration! Consider the following basic html page:
<title>Title of the document</title>
The content of the document……
From the HTML markup above we see a very basic html page with all the core tags that make up a fully parsable HTML web page. The starting point is the <!DOCTYPE> tag which is a declaration telling the browser which version of HTML the page uses. If an HTML page has no DOCTYPE tag specified, then browsers may use their own value and in turn, render the web page inconsistently across browsers.
HTML 4 DOCTYPES
Most websites on the web still run on HTML 4 which is the predecessor to HTML 5. The DOCTYPE on an HTML 4 page may be one of the following:
- Transitional DOCTYPE which allows the use of deprecated, presentation-related elements from previous versions (e.g HTML 1.0) of HTML
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd>
- Frameset DOCTYPE which allows the use of frames in addition to elements allowed by the transitional DOCTYPE.
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Frameset//EN” “http://www.w3.org/TR/html4/frameset.dtd>
- Strict DOCTYPE, which does not permit the use of frames or deprecated elements from previous versions of HTML.
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd>
Declaring a HTML page HTML 5 compliant is very easy. The declaration is as follows:
That’s it! Nothing else required. Hence the HTML page markup defined at the beginning of this post is 100% HTML 5. Hence indeed, less is more!!
Are you having challenges in developing HTML 5 web pages? Get in touch with us today.