spacer

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

home / web / dev / html4nsie / text 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

Text Spec
Paragraphs, Lines and Phrases

Whitespace Spec

Both Netscape and Explorer generally support whitespace rules. One exception is that a whitespace immediately after a start tag or before an end tag should be ignored but in these two browsers it is not. Instead, it creates a continuation of the underline for the link. For instance, in the example below, the link is written without any whitespace after the start tag or before the end tag.

  We offer free technical support.

This link has whitespace after the start tag:

  We offer free  technical support.
                ^

Whereas this one has whitespace before the end tag:

  We offer free technical support .
                                 ^

The link is valid but this could cause problems when the link is copied or printed directly from the Web page and used in another situation in which the whitespace is incorporated as a part of the link itself. Obviously, the way to correct this is to write proper code.

Phrase Elements Spec

Phrase elements are rendered by both browsers as equivalent to text-level font style elements:

  • em, cite, dfn, var - rendered in italics
  • strong - rendered in bold
  • code, samp, kbd - rendered in monospaced font

The abbr and acronym elements work as they are supposed to in Netscape, except that they are rendered with a dotted underline. Explorer only recognizes acronym, but doesn't render its contents in any special way.

Quotations Spec

Both browsers support the blockquote element and render it as an indented block of text. Netscape recognizes the q element and renders it with quotation marks. Explorer also recognizes the q element but does not insert quotation marks to delimit the element's contents, making it rather useless. Neither browser recognizes the cite attribute as used in blockquote elements.

Subscripts and Superscripts Spec

Both browsers support and render correctly the sub and sup elements.

Paragraphs Spec

Paragraphs, and in particular the p element, are one of the most glaring inconsistencies of the HTML implementations in Netscape and Explorer. Essentially, both browsers will consider a <p> start tag to be a double linebreak, though the story is not that simple.

Example 1

Example 1
Example 2

Example 2

If you look at it from the purist's point of view, p elements are rendered correctly with the following exception in Explorer: The space after a paragraph and before the next block-level element is not rendered if you do not include the end tag to the paragraph, unless the next element is a paragraph, a heading, a list, a blockquote, or a pre element. Confused? Let me explain. The following example:

<p>This is a paragraph.
<hr>
<p>This is another paragraph.

is rendered with no blank line between the first p element and the hr element (Example 1), while this example:

<p>This is a paragraph.</p>
<hr>
<p>This is another paragraph.

is rendered with the normal blank line between the p element and the hr element (Example 2).

Netscape places a blank line between the first p element and the hr element with or without an end tag.

Line breaks Spec

The br element is rendered as indicated by the specification, and the &nbsp; character also serves as a way to prohibit line breaks.

Hyphenation Spec

Neither browser supports the semantics of the soft hyphen (&shy;), displaying it as a normal hyphen. Explorer may break a line where it occurs.

Preformatted Text Spec

Both browsers support the pre element. In addition, Netscape supports a cols attribute that specifies the number of columns in the element's contents, and a wrap attribute that indicates that the text should be wrapped at the specified width, or the screen width if the cols attribute is missing. Neither elements are part of the HTML 4.01 specifications. Both user agents render tab characters as tabs to tab stops 8 characters apart.

Document changes Spec

Netscape and Explorer both recognize the ins element, displaying it with an underline. This may cause it to look like a link in some cases. They also recognize the del element, displaying it as struck-through text. Neither browser does anything special with the value of the datetime or cite attributes.

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