Can anchor text be empty?

Michal Young (young@cs.purdue.edu)
Thu, 20 Apr 1995 13:04:45 +0500


I have some (automatically generated) html that looks like this:

<A NAME="GuideB"></A>

This seems to be legal according to the html spec. Netscape
has no trouble with it, but NCSA Mosaic (for X) seems to require non-empty
text between the beginning and ending tag. I haven't done experiments to
determine whether I can just place a blank there, or whether it needs
something more.

Am I misunderstanding the spec (if so, please explain), or is Mosaic
broken? If Mosaic is broken, I'll probably just continue to generate html
in this fashion and document that the workaround is to use a more robust
browser. If Mosaic is correct in rejecting this, I need an explanation of
what is required, preferably with a pointer to the part of the html spec
(any version) that lays out the rules for text that MUST appear between
tags.

****

Just for context, why my html looks like this: I create an alphabetical
index at the top of a page, with guide letters a-z. When I create the
guide letters, I have no idea whether there will actually be any index
entries for Q (for instance). I set the html up so that, if there are no Q
entries, clicking the Q guide will jump to the next non-empty set of index
entries, like so:

<A NAME="GuideQ"></A>
<A NAME="GuideR"></A>
<H2>R</H2>

----------------------
Michal Young
Purdue University
Software Engineering Research Center
Department of Computer Sciences
1398 Computer Science Building
West Lafayette, IN 47907-1398
voice: 317-494-6023
fax: 317-494-0739
URL: http://www.cs.purdue.edu/people/young
-----------------------