Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to support both HTML4 and HTML5?

Tags:

html

css

So I have a complete website written in HTML4 with CSS2/CSS3 support - i.e. mainly taking advantages of most of the CSS3 where supported.

I want to upgrade the site to support HTML5 - but little confused [using Visual Studio 2010 / ASP.NET MVC etc] how I can support both HTML4 and HTML5 ?

Do I need to rewrite the entire site in HTML5 or ? Little confused how to support both HTML4 and HTML5 ?

like image 903
Tom Avatar asked Jun 19 '11 12:06

Tom


1 Answers

You don't need to do anything.

HTML5 is an umbrella term for a collection of loosely-related client-side features supported by recent browsers.
You can just use any features you like.

Just make sure to implement a fallback so that the site still works in browsers that don't support the new features.
The Modernizr library can be very useful here.


You can use the new HTML5 tags even in HTML4.
However, you'll need to include a shiv to make them style-able in IE < 9.
Modernizr already includes this.

like image 92
SLaks Avatar answered Oct 18 '22 11:10

SLaks