HTML5

HTML5 is largely mature enough to start using now with ASP.NET websites.

To start with, get the Web Standards update for Visual Studio 2010 SP1: http://visualstudiogallery.msdn.microsoft.com/a15c3ce9-f58f-42b7-8668-53f6cdc2cd83

The following are a list of things that I do to be compatible with HTML5.

Use the html5 doctype at the top of every page:

<!DOCTYPE html>

Set the lang in the html tag:

<html lang="en">

Declare the character incoding in a meta tag in the head:

<meta charset="utf-8" />

Don’t declare the type or language in script tags:

<script src="/Lib/JavaScript/jquery-1.6.2.min.js"></script>

Don’t declare the type in css links:

<link rel="stylesheet" href="/Lib/Styles/colorbox.css" />

Include this so old versions of IE behave:

<!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

Use <header>, <nav>, <section>, <article> and <footer> tags for the page structure

Get more info at http://diveintohtml5.org/semantics.html

Advertisement

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: