Now a day, HTML5 is very HOT topic in Internet world. The new language is generally considered a step forward from the previous version, HTML 4.01. In HTML5, most of tags are same using in the HTML 4.01 but at the same time they are introducing some new tags and vanished some tags in HTML 5.
Let we see the main difference between HTML 4.01 and HTML 5 Tags.
|Tag||HTML 4.01||HTML 5||Detail|
1. Transitional <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
2. Strict <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
3. XHTML <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
1. <!DOCTYPE HTML>
|In HTML 4.01 it require 3 different DOCTYPEs while in HTML5 only 1 required. This declaration is NOT case sensitive. This will describe to browser that which version is written inside the document.|
|<acronym> & <abbr>||Available to mention the abbreviations. Also available <abbr>.||Only available <abbr> and <acronym> removed||Both tags has the same functionality. In HTML 5 only <abbr> is available.|
|<article>||Not Available||New in HTML5
1. pubDate (Defines the time and date that the article was first published.)
2. cite (URL of the article, if it is taken from the web)
|The <article> tag defines external content.
The external content could be a news-article from an external provider, or a text from a web log (blog), or a text from a forum, or any other content from an external source.
|<center>||<center>This text will be centered.</center>||Not Available||The <center> tag is used to center text.
In HTML5, Use CSS to define fonts.
|<font>||<font size=”3″ color=”red”>This is some text!</font>||Not Available||The <font> tag specifies the font face, font size, and font color of text.
In HTML5, Use CSS to define fonts.
|<audio>||-||<audio src=”hellophp.ogg” controls=”controls”>
Your browser does not support the audio element.
|New introduced in HTML5. This tag defines sound, such as music or other audio streams.|
|<embed>||-||<embed src=”helloworld.swf” />||New in HTML5. The <embed> tag defines embedded content, such as a plug-in.|
|<video>||-||<video src=”movie.ogg” controls=”controls”>
your browser does not support the video tag
|The <video> tag defines video, such as a movie clip or other video streams.|
Some attributes in the tags are very helpful. For example
1. contenteditable -> if you will set the value true in any div or section then the div will editable in HTML file.
Some of the attributes are mentioned in the above table. Especially, some more new important tags introduced in HTML5 and some basic tags used in HTML 4.01 but removed from HTML 5. You can read the list of details tags at W3Schools.
HTML 5 is “the 5th major revision of the core language of the World Wide Web: the Hypertext Markup Language (HTML).” See->W3C Working Draft 10 June 2008. HTML 5 is being created to fix some problems and improve interoperability between different user agents. HTML5 means a few things:
- It will allow for better cross browser compatibility between mobile, desktop, netbook, PDA, Ereader and whatever else can display a web page.
- It gives web developers new functionality to make for a more dynamic, improved user experience.
- The language should allow for some performance improvements in page load as the need for additional code in web pages is thinned down a little.
2. Tags Definitions.