[WEB4LIB] Re: Mozilla/Netscape 7.0 -- Students
Chris Gray
cpgray at library.uwaterloo.ca
Thu Jul 25 09:13:43 EDT 2002
A good idea is to run pages through HTML Tidy
<http://www.w3.org/People/Raggett/tidy/>. It would have caught (and
fixed) the problem with the comments and other problems of the sort Peter
mentioned. (The free HTML editor HTML-kit
<http://www.chami.com/html-kit/> has Tidy built in and I find it very
handy.)
Chris Gray
Systems Analyst
University of Waterloo Library
On Thu, 25 Jul 2002, Peter C. Gorman wrote:
> At 7:34 PM -0700 7/24/02, Darryl Friesen wrote:
> >> We keep running into problems with Mozilla. After some serious testing,
> >> trying different things, we are positive that it is a problem with
> >> Mozilla
> >> itself and not with our code. The problem seems to specifically be with
> >> comments <!-- -->. Mozilla is having various issues with the comments
> >> i.e. it does NOT read comments properly in all instances.
> >
> >It's a problem with the code (specifically, the comments), not the browser.
> >>From the Comments section of the HTML 4 spec: (see
> >http://www.htmlhelp.com/reference/html40/structure.html)
> >
> > Comments in HTML have a complicated syntax that can be simplified
> > by following this rule: Begin a comment with "<!--", end it with
> > "-->", and do not use "--" within the comment.
> >
> >The code from the url you gave has "--" _within_ the comment itself; a
> >definite no-no. Is Mozilla a bit too picky? Perhaps, but that's a Good
> >Thing. Forcing compliance with the standard can only make the web better.
>
> The unsimplified explanation is that the markup for comments is
> composed of two parts: a processing instruction <![stuff here]>
> containing (only) a comment --[stuff here]--. In HTML, one rarely
> sees processing instructions that aren't just containers for
> comments, although the DOCTYPE declaration is one (the only?)
> example. So, a better statement of the rule may be "comments start
> and end with '--' and must be enclosed within a processing
> instruction '<!>'." Anything after the second "--" will be taken to
> be part of a processing instruction which browsers will
> understandably have a hard time understanding.
>
> There are also a number of validation errors on the page in question
> - overlapping elements, etc. that could be causing some problems and
> are easily fixable. It looks like the comments have already been
> fixed, and the page seems to be displaying properly with Mozilla
> (Mac).
>
> --
> _______________________________
> Peter C. Gorman
> Senior Technology Librarian
> University of Wisconsin-Madison
> Library Technology Group
> pgorman at library.wisc.edu
> (608) 265-5291
>
> "We consider that any man who can fiddle all through one of those
> Virginia Reels without losing his grip, may be depended upon in any
> kind of musical emergency." -- Mark Twain.
>
More information about the Web4lib
mailing list