Standards ... or be careful what you ask for
Thanks in part to the tireless efforts of Zeldman and Co. (Webstandards.org) and to pressure from thousands of developers like you, NS6, IE5.5, and Opera 5 are now the most standards-based, DOM-compliant browsers available. Someday these efforts will pay off for a code-once future (some are already there and challenging others to follow), but for production and educational sites like ours, you need to code for the widest possible audience. That means supporting both legacy and modern browsers.
HTML and CSS
Older browsers have been very forgiving in terms of dealing with invalid HTML. They've "fixed" your bad markup in ways that you've become used to. Many Web developers have become dependent upon this non-standard fixup performed by the older browsers and don't know how to write valid HTML. The result is what some call "tag soup." Browsers that are standards-compliant depend upon valid markup in order to apply the complex rules of CSS. There is no reliable way for a browser to apply standard layout rules to invalid HTML. You've got to learn to write valid HTML if you're going to support modern browsers. The only other choice is to live in the proprietary world of the 4.x browsers. And that's a Bad Thing (tm).
NS6 relies upon properly nested HTML tags as well as their proper closure.
SGML Document Type Declarations (DOCTYPEs)
The Document Type Declaration or DOCTYPE is an SGML declaration that tells the browser which version of HTML the page is using. Inside the DOCTYPE tag is a Document Type Definition (DTD) that defines what version of HTML you're coding for, and the syntactic rules to follow.
DOCTYPE tags in HTML signify which standard the HTML follows, if any. In the past, DOCTYPEs have not been that meaningful and many Web page authors and authoring tools use DOCTYPEs that do not match the actual HTML. Modern browsers such as NS6 and Internet Explorer 5 for the Mac sniff the DOCTYPE to determine whether an HTML page should be laid out according to the "Quirky" behavior of earlier browsers or if it should be laid out using the stricter modern standards.
It is very important that you use the appropriate DOCTYPE in order to tell the browser how you expect your page to be laid out. Here's a brief DOCTYPE usage guide.
|Pre HTML 4.0 DOCTYPEs||Quirks||<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">|
|HTML 4.x Transitional DOCTYPE without a URI||Quirks||<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">|
|HTML 4.0 Transitional DOCTYPE with a URI||Quirks in NS6, Standards in IE5/Mac||<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">|
|HTML 4.01 Transitional DOCTYPE with a URI||Standards||<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">||use for documents that validate as HTML 4.01 Transitional that may contain deprecated HTML and that works with the CSS2 box model|
|HTML 4.x Strict DOCTYPE||Standards||<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">||use for documents that validate as HTML 4.01 Strict and that works with the CSS2 box model|
For more details on DOCTYPE and other related matters, see Henri Sivonen's fine explanations at Activating the Right Layout Mode in Mozilla and IE5 for Mac and Things to Take into Account When Moving to Standards-Compliant HTML and CSS Authoring.
- Run time errors reported as exceptions
- Number formatting (Number.prototype.toFixed and Number.prototype.toExponential)
- Enhancements to Regular Expressions
Other enhancements include:
- Conditional function declarations
- Multiple catch clauses
- Getters and Setters for Object properties
- New const keyword
- "Strict" mode with additional warning messages to help catch bugs
NS6 supports to a great extent the DOM Level 1 and Level 2 standards. NS6 no longer supports the earlier Netscape Navigator 4.x proprietary DOM that included layers.
Created: February 15, 2001
Revised: Mar. 6, 2001