CSS3 HTML5 - No flux capacitor needed.

CSS3 and HTML5 are still making their final steps into the world, support is growing amongst browsers based on, webkit(Safari/Chrome), mozilla(Firefox) and Opera.

CSS3

Regarding css3 support for many functions is still based on the type of browser, for instance to create a shadow on an element we must do the following:

		
/* Your standard CSS class declaration*/
.shadow_class { 

	/*	mozila */
		-moz-box-shadow: -5px -5px 5px #888;

	/*	webkit */
		-webkit-box-shadow: -5px -5px 5px #888;

	/* others  + ie9 (possibly - beta not encouraging.) */
		box-shadow: -5px -5px 5px #888;

}
	

There is slight variation in the rendering of the above code, and we are still at a point where such a basic concept such as a shadow can fall flat on its face. However this is not to say that we shouldn't try and use as much CSS3 and HTML5 as possible. We will go into detail regarding HTML5 in a little while, first lets have a look at a few simple things what we can accomplish with CSS3.

CSS3 Fun

HTML5

HTML5 is arguably less supported than CSS3 at the moment, however with some useful javascript libraries support is less important than it may seem. Modernizr is a nice bit of javascript which tells you what the browser can support which gives us the chance to create a backup or allow the page to gracefully degrade.

What is HTML5?

HTML5 is all over the place. Most talk is currently of HTML5 video but HTML5 will have some interesting repercussions for design and development of sites. From a development point of view we have some interesting tags which link semantically with the construction of the document.

			
<!-- instead of -->

<div id="header"> header content here </div>
<div id="footer"> footer content here </div>

<!-- we have -->

<header> header content here </header>
<footer> footer content here </footer>
	

The header/footer tags and their siblings are intended to provide structure to the document, this will help HTML5 be more useful for a wider range of devices(accessibility)

Take the following example, the Birthday Project website uses a input type of "date", this isn't widely supported with only Opera offering us a date selector. With a simple statement we can determine whether the browser provides a date selector and using some jQuery put our own date selector in if it doesn't.

For the most part we can use this to detect and replace any elements of the design we have made with HTML5 in mind. However, this is akin to creating a separate ie6 stylesheet for example, it will be added development time, however unlike ie6 fixes using Modernizr could enhance our sites with time not just become redundant. blah blah blah etc etc

HTML5 Fun

Here we have some examples of HTML5 in action.

Why use it?

Describe using it here.

Perspectives