Thursday, October 9, 2008

Check Your Work

Are you still checking your work in as many browsers as you can?

For some reason, people tend to feel like if you are using the Templates, it means you no longer have to check your pages. This isn't as true as we would like it to be, yet.

The rules for how HTML tags are supposed to work were written many years ago. You can check them out for yourself today at the W3C. But, somehow, everyone managed to read them differently. In some cases, the differences were minor, but in other cases they are pretty major. The bottom line is that we are still a long way from the television model, where a TV program looks pretty much the same on a Sony or a Toshiba or a Panasonic television.

If you haven't checked your pages in several browsers, you may be surprised at how different they look in Internet Explorer, Safari, Firefox, Chrome or Netscape[!]. And even across platforms. Pages look different on PCs and Macs, too. Some of these differences are due to the size of the viewport, some are due to video resolution and others are differences in rendering.

Suppose you have an egg carton, and suppose you have thirteen eggs (for the bachelors in the audience, an egg carton is built to hold only an even dozen eggs). That's a situation a lot of Web browsers find themselves in from time to time, when a Web designer has stipulated limits on a box, but then come up with too much content to fill that box comfortably. Some browsers will honor the content, stretching the box as necessary to fit it all in—like an egg carton that suddenly has thirteen spaces for eggs in it. Other browsers will honor the container and cause any extra content to disappear. You end up having to scroll that box to see everything.

Some of the rules are written in a way that invites trouble. The standard does not limit sizes, weights or styles for headings, strong or emphasized text. It only states that the new text must be sufficiently different from the surrounding text that the reader understands there is something different about this word or phrase. This stems from the Olden Days, when we only had text, and only two of anything that looked like fonts, and only about sixteen colors. Today pretty much everyone renders an H1 heading at 200% of normal size, and in bold. But by the time you get all of the way down to the H6, there is little in common between Safari and Firefox and Internet Explorer and the others.

I routinely work on a Macintosh, and develop pages in Firefox. Then I check the pages in Safari on the Mac and switch over into Windows mode to check them again in Firefox for the PC and in Microsoft's Internet Explorer. When there are problems, I usually find them in IE. Most often it's a simple fix but there have been occasions when I have had to abandon something because I couldn't get it to work in all browsers.

We may one day get to a point where everyone is either using the same browser, or every browser is using the same interpretation of the rules. There was never a time when Milton Berle came on TV with a graphic saying "Best Viewed on Zenith Televisions" and Jack Benny came on with another graphic saying "Best Viewed on Admiral Televisions". All of the TV folks were able to read the published specifications and come up with cameras and receivers that worked, no matter what. Maybe one day we will get to that point on the Web, when pages will look the same on iPhones and iMacs and PCs. But I suspect we'll be fighting this battle for a long time to come.

Until that day, check your work in as many browsers as you can find.

No comments: