My First Steps Into HTML5

Today I started coding on my first HTML5 project.
This new standard is very promising, it makes code a lot more semantic and readable, and it also makes our life easyer (or at least, it will eventually).

I started on reading some resources, the most important are listed below:

http://diveintohtml5.org/semantics.html

After this, I set up a structure in HTML5, and started the coding. I quickly found that even firefox font apply CSS to the new <article> and <section> elements.
I solved this by adding <div>’s to my structure, like this:

<article><div class=”article”></div></article>

You probaby think, okay then what’s the point of using HTML5 at this moment? Well, I thought the same and had a discussion about this with a friend of mine.
He stated that, even though it takes more lines of code and not all browsers support it right now, it is still worth the effort.

There are two reasons for this:

- Your websites will be ready for HTML5 when it will be broadly supported by all browsers.
- It will improve the readability of your code (also for search engines!).

Because of this, I was convinced that it is a good thing to start implementing HTML5 in my code.
I encountered another problem, and you can guess: it’s IE. Internet Explorer does not understand any of the HTML5 properties, so you have to use JavaScript to force it to understand it.
This is achieved by the following lines of code:

<!–[if IE]>

<script src=”http://html5shiv.googlecode.com/svn/trunk/html5.js”></script>

<![endif]–>

This makes sure that when the client is using IE, it will load the JS that make HTML5 work (thanks to htm5shiv).

You can take a look at some of the code I wrote today here, I hope this post helped your HTML5 efforts!

Continue Reading...

Bye Bye, IE6

Yes, I am too dropping support for the outdated but still widely used IE6. It’s old (2001!), it has numerous compatibility issues, it is not safe and it is lacking all the features a modern browser needs. It doesn’t even have tabs. But why do people keep on using it??

The main reason is because most websites still support it. Also, a lot of internal company systems only work in IE6, and last but not least, people just don’t know that they are running an unsafe, outdated browser.

If we want to have a better internet, and give people a better experience, we as webdevelopers have to stop supporting IE6. But if you make it hard for yourself and waste your time in IE6 hacking, you’re doing the exact opposite. All the hacks that we use on our sites is the main reason IE6 still is a big player on the browser market.

In stead, give your users a message that they are using an old and unsafe browser, and give them directions in how to upgrade to a more modern browser.
This way, you are not completely ignoring IE6 users, and presenting them with a broken website. Don’t be scared that dropping IE6 support will make you lose all those precious users.

Do not make the mistake of only telling people to get Firefox, or another open-source alternative. The unknown will make your users go away, so be sure to mention IE8 as well (it’s kinda good anyway)!

So let’s all drop IE6 support, and make the web better :)

Continue Reading...

About Me

MeThis is the blog of Gerben van Dijk. Front-end developer, music and movie fanatic, photographing enthousiast.

Search

Categories

Archives

Meta