homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

White Space Bugs

 5:34 pm on Nov 12, 2000 (gmt 0)

From day one it should have been a nice feature of all HTML. Extra line spaces and carriage returns aren't supposed to affect the display of your code. A nice touch, so you can organize your HTML code for enhanced readability.

But, from the beginning, Netscape and MSIE did not fully accommodate this rule. Most of the time it's just a little annoyance -- most website visitors don't even notice it. And, to be fair, many of these bugs have been worked out in the most recent versions of MSIE. But if you use Netscape, code that looks like this:


will extended the underline for an extra linespace after the word "text" ends. Older versions of MSIE will also.

This can become a very big deal if you're slicing up graphics and fitting the pieces together on the page.

There are also other code combinations that display an extra space where none should be rendered, and I've not been able to fully come to grips with this. Sometimes I've yet to discover a workaround.

I have one live page on a client site that shows a small sliver between two pieces of graphic -- and I am embarrassed by that. I've minimized the effect with some bgcolor, but in Netscape, it's still there and I know it.

Can anyone shed further light on this little but persistent issue? And why, after all these years and versions, does Netscape still screw it up?



 7:10 am on Nov 17, 2000 (gmt 0)

>Extra line spaces and carriage returns aren't
>supposed to affect the display of your code.

Hmm, not a bug.

The first return encountered is decoded as a space. That is in the 3.2 spec. So the return before the </u> is the problem child.

(btw: old rule of thumb: never under any circumstances except penalty of law should you use an underline tag). Underlines are reserved for links and it confuses people. There was a study done by UIE(?) that showed pages that have underlines on them that are not links are less productive (people leave the site).


 7:12 am on Nov 17, 2000 (gmt 0)

Whoops. The 3.2 spec actually says:

The SGML rules for record boundaries are tricky. In particular, a record end immediately following a start tag should be discarded. For example:

is equivalent to:

Similarly, a record end immediately preceding an end tag should be discarded. For example:

is equivalent to:

Except within literal text (e.g. the PRE element), HTML treats contiguous sequences of white space characters as being equivalent to a single space character (ASCII decimal 32). These rules allow authors considerable flexibility when editing the marked-up text directly. Note that future revisions to HTML may allow for the interpretation of the horizontal tab character (ASCII decimal 9) with respect to a tab rule defined by an associated style sheet.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved