What is difference between HTML4.0 and HTML5 ?

HTML 4 is a standard released by W3C and HTML 5 is a newer version. That sentence which seems to be obvious tells us that HTML 5 comes with improvements. It comes with new HTML tag such as <article>, <section>, <aside>, <video>, but it removes some tags as well when CSS can do the job very well.
 
1. HTML5 Is a Work in Progress

As cool as it is to see what HTML5 can do for you, it hasn’t been standardized like HTML4. You don’t have to worry about updating pages built using HTML4. It’s more than ten years old and it’s a set standard.

If you jump into HTML5 with both feet, you’re going to be making updates. Elements and attributes are added and modified several times a year. Of course, this is dependent how much you depend on rich elements, but it’s certainly a risk you must take into consideration when using a fluid language.

Build with HTML4, play with HTML5.

2. Simplified Syntax

The simpler doctype declaration is just one of the many novelties in HTML5. Now you need to write only: <!doctype html> and this is it. The syntax of HTML5 is compatible with HTML4 and XHTML1, but not with SGML.

3. The New <canvas> Element

This is what killed Flash.

Although it isn’t as … uh … flashy … most assume that it will eventually make Flash obsolete.

Only time will tell.

4. The <header> and <footer> Elements

For good or bad, HTML5 has acknowledged the new web anatomy. With HTML5, <header> and <footer> are specifically marked for such. Because of this, it is unnecessary to identify these two elements with a <div> tag.

5. New <section> and <article> Elements

Again, HTML5 has adopted the popular web standard. <section> and <article> allows you to mark specific areas of your layout as such, and should have a positive effect on on your SEO in the end.

6. New <menu> and <figure> Elements

<menu> can be used for your main menu, but it can also be used for toolbars and context menus. The <figure> element is another way to arrange text and images.

8. New <audio> and <video> Elements

Embedind audio and video has never been easier.

There are also some new multimedia elements and attributes, such as <track>, that provides text tracks for the video element. With these additions HTML5 is definitely getting more and more Web 2.0-friendly. The problem is that by the time HTML5 becomes widely accepted, Web 2.0 might be old news.

8. New Forms

The new <form> and <forminput> elements are looking good. If you do much with forms, you may want to take a look at what these have to offer.

9. Kiss <b> and <font> Goodbye!

CSS, all the time.

All the time, CSS.

10. No More <frame>, <center>, <big>

I bet you’re going to miss these. &#55357;&#56841;
 
HTML5 has several goals which differentiate it from HTML4.

Consistency in Handling Malformed Documents
The primary one is consistent, defined error handling. As you know, HTML purposely supports 'tag soup', or the ability to write malformed code and have it corrected into a valid document. The problem is that the rules for doing this aren't written down anywhere. When a new browser vendor wants to enter the market, they just have to test malformed documents in various browsers (especially IE) and reverse-engineer their error handling. If they don't, then many pages won't display correctly (estimates place roughly 90% of pages on the net as being at least somewhat malformed).

So, HTML5 is attempting to discover and codify this error handling, so that browser developers can all standardize and greatly reduce the time and money required to display things consistently. As well, long in the future after HTML has died as a document format, historians may still want to read our documents, and having a completely defined parsing algorithm will greatly aid this.

Better Web Application Features
The secondary goal of HTML5 is to develop the ability of the browser to be an application platform, via HTML, CSS, and Javascript. Many elements have been added directly to the language that are currently (in HTML4) Flash or JS-based hacks, such as <canvas>, <video>, and <audio>. Useful things such as Local Storage (a js-accessible browser-built-in key-value database, for storing information beyond what cookies can hold), new input types such as date for which the browser can expose easy user interface (so that we don't have to use our js-based calendar date-pickers), and browser-supported form validation will make developing web applications much simpler for the developers, and make them much faster for the users (since many things will be supported natively, rather than hacked in via javascript).

Improved Element Semantics
There are many other smaller efforts taking place in HTML5, such as better-defined semantic roles for existing elements (<strong> and <em> now actually mean something different, and even <b> and <i> have vague semantics that should work well when parsing legacy documents) and adding new elements with useful semantics - <article>, <section>, <header>, <aside>, and <nav> should replace the majority of <div>s used on a web page, making your pages a bit more semantic, but more importantly, easier to read. No more painful scanning to see just what that random </div> is closing - instead you'll have an obvious </header>, or </article>, making the structure of your document much more intuitive.
 
HTML 4 is a standard released by W3C and HTML 5 is a newer version. That sentence which seems to be obvious tells us that HTML 5 comes with improvements. It comes with new HTML tag such as <article>, <section>, <aside>, <video>, but it removes some tags as well when CSS can do the job very well.
 
HTML 5 can also utilize other standards such as W3C's CSS3 (cascading style sheets). For multimedia presentation, the Khronos Group has defined WebGL (Web-based Graphics Library). WebGL extends JavaScript allowing access to 3D graphics hardware. This is something that could only be done requiring special plugins with HTML 4.

Bulkmailstack
 
Back
Top