spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / web / dev / html4nsie / sgml nav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav button
Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source

SGML and HTML Spec
Remembering your heritage

Elements Spec

It's good practice to include both the start and end tags of all of your elements, especially if you're going to be using scripting or stylesheets, since the object model of the two browsers will usually not include elements whose tags have been omitted.

Both browsers will usually take any element literally and not worry about its content or its parent element. A good example is lists that contain character data instead of list items. These methods have often been used to achieve formatting effects such as indenting text, but with the advent of stylesheets and the partial support of CSS1 by both Netscape and Explorer this has become useless. I recommend that you avoid these methods and stick to the specification, only using elements for their intended purpose. There is no longer any reason to abuse the leniency or inconsistencies in the browser's implementations to achieve effects that can be achieved according to the specification.

Attributes Spec

Values in attributes can usually be unquoted in both browsers and still fulfill their intended purpose, but this is not recommended since other browsers will often get confused. It can also lead to problems when using JavaScript.

Character References Spec

Both Netscape and Explorer can display all of the HTML 4.01 character entity references, in addition to numeric character references and hexadecimal character references.

Both will usually render character references even if the ending semi-colon is omitted. This, however, is a bad practice and doesn't always work. You should make sure your character references are properly terminated.

Netscape and Explorer will directly render character references they don't identify, i.e. they will display the ampersand, reference, and semi-colon.

Comments Spec

Comments act strange within Netscape and Explorer when you don't use them correctly. If a comment is started with (<!--) and the end of it (-->) cannot be found, it will be ended at the first tag end delimiter (>). This can be very frustrating when you're trying to comment out parts of your document that contain tags. Contrary to what the specification states, Netscape and Explorer do not accept whitespace after the end of the comment (the two dashes) and the tag end delimiter. Also contrary to the specification, they do not complain about strings of two or more dashes within a comment.

Generally speaking, it is useful to ignore the SGML semantics of comments and treat them as something like an element with a special start tag that is exactly <!-- and an end tag that is exactly -->. If you want to adhere to the spec, you should make sure there are no consecutive dashes between these tags.

SGML Constructs

Keeping with their unknown tag tolerance policy, the two browsers will ignore any SGML construct within a document as an unknown tag. Care should be taken not to end this perceived tag prematurely by including a tag end delimiter (>) within the construct.

nav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav buttonnav button

http://www.internet.com

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Crucial Triples Up With New Three-Channel DDR3 Kits · Meet the Finalists: Excellence in Technology Awards · Tealeaf Offers Insight to Mobile Customer Behavior


All Rights Reserved. Legal Notices.
Created: Mar. 12, 1998
Revised: November 15, 2004