HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [29]
IE6 and earlier versions used Microsoft’s own variation of standards. They display old-style HTML well, but these browsers don’t comply perfectly with all the W3C standards. Having a version of one of these older browsers around is important so you can see how your pages display in them. If you write standards-compliant code, you’ll find that it doesn’t work perfectly in these variations. You need to do some tweaking to make some features come out right. Don’t panic, because they’re relatively small details, and I point out the strategies you need as we go.
Checking your pages on IE6 or earlier is necessary. Unfortunately, if you have IE8 (or whatever comes next), you probably don’t have IE6 any longer. You can’t have two versions of IE running on the same machine at once (at least, not easily), so you might need to keep an older machine just for testing purposes. You can use a testing site, such as Spoon.net (www.spoon.net/browsers), to check how various browsers render your pages if you don’t want to install all the other browsers.
Mozilla Firefox
Developers writing standards-compliant code frequently test their pages in Firefox because it has a great reputation for standards compliance. Firefox has other advantages, as well, such as
♦ Better code view: If you view the HTML code of a page, you see the code in a special window. The code has syntax coloring, which makes it easy to read. IE often displays code in Notepad, which is confusing because you think you can edit the code, but you’re simply editing a copy.
♦ Better error-handling: You’ll make mistakes. Generally, Firefox does a better job of pointing out errors than IE, especially when you begin using JavaScript and other advanced technologies.
♦ Great extensions: As you see later in this chapter, Firefox has some wonderful extensions that make Web development a lot easier. These extensions allow you to modify your code on the fly, automatically validate your code, and explore the structure of your page dynamically.
Google Chrome
Google has jumped into the fray with an interesting browser called Chrome. Google sees the future of computing in browser-based applications using AJAX technologies. The Chrome browser is extremely fast, especially in the JavaScript technology that serves as the foundation to this strategy. Chrome complies quite well with common standards, so if your pages look good in Firefox, they’ll also do well in Chrome.
Other notable browsers
Firefox and IE are the big players in the browser world, but they certainly aren’t the only browsers you will encounter.
Opera
The Opera Web browser, one of the earliest standards-compliant browsers, is a technically solid browser that has never been widely used. If you design your pages with strict compliance in mind, users with Opera have no problems accessing them.
Webkit/Safari
Apple includes a Web browser in all recent versions of Mac OS. The current incarnation — Safari — is an excellent standards-compliant browser. Safari was originally designed only for the Mac, but a Windows version has been released recently. The Webkit framework, the foundation for Safari, is used in a number of other online applications, mainly on the Mac. It’s also the foundation of the browsers on the iPhone and iPad.
Mozilla
There’s still a Mozilla browser, but it has been replaced largely with Firefox. Because Mozilla uses the same underlying engine, it renders code the same way Firefox does.
Portable browsers
The Web isn’t just about desktops anymore. Lots of people browse the Web with cellphones, iPhones, and PDAs. These devices often have specialized Web browsers designed to handle the particular needs of the portable gadget. However, these devices usually have tiny screens, small memory capacity, and slower download speeds than their desktop cousins. A portable browser rarely displays a page the way it’s intended to appear on a desktop machine. Portable browsers usually do a good job of making standards-compliant