Browser neutrality

Design for everyone

When I write websites I usually make sure they work in Firefox first (as this is my browser of choice) then Internet Explorer. This covers more bases than you may think, since Firefox, Netscape, Mozilla, and a few other browsers use the same Gecko engine to render web pages. That will cover the most popular browsers. No matter what you do, make sure you check at least one Gecko browser and Internet Explorer. Beyond that, you'll have to decide what your audience is likely to use.

If you can help it, do not design for Internet Explorer first. IE has many rendering bugs that you won't even notice until you look at your site in another browser. Then trying to fix your page to work in other browsers, and still work in IE, will be a pain since you may have relied on IE's bugs while designing. If you design for another browser, preferably a Gecko browser, and fix in IE, you will often have much less work.

All this will require you to have several browsers and versions of browsers installed on your development machine. For many browsers, having multiple versions installed is not a problem. However, due to the nature of Internet Explorer, running multiple versions of IE is not so simple. This tool is excellent for solving that problem.

Making specific browsers behave

At times you run into cases where different browsers need different code to do the same thing. It is possible to send different browsers different code, but be careful. Things can become unpredictable when new browser versions are released. Internet Explorer's conditional comments are ideal for these situations and are future-proof if only existing versions are targeted.

Validation

Always make sure your site validates properly with W3C standards. When browsers have invalid code the browser sometimes will get thrown into quirks mode, where it guesses at what is intended. Different browsers may guess differently, which will make your page render differently. Validating your site will eliminate the guessing games, and make your pages load slightly faster because of it.

There are options as to how you want to validate your pages. This site uses XHTML 1.0. Most validated sites stick with HTML 4.01, but XHTML is becoming the standard. Try XHTML 1.0 if you can. If you want some leeway, you can validate as Transitional instead of Strict.

If you're using CSS in your code, make sure to validate your CSS as well.

Validation also brings the bonus of putting a W3C icon on your pages showing that they validate properly. For businesses this can be a selling point to those who know what it is, since it shows you took that extra step. If their images don't suit your site, there is nothing wrong with using different ones, making your own, or just using a text link.

Valid XHTML 1.0 Strict! Valid CSS!
The W3C stickers
Previous Next