Re: Empty anchor

Bert Bos (bert@let.rug.nl)
Tue, 13 Sep 1994 18:16:53 +0200 (METDST)


Message-Id: <199409131616.AA285503014@freya.let.rug.nl>
From: Bert Bos <bert@let.rug.nl>
Subject: Re: Empty anchor
To: john@math.nwu.edu (John Franks)
Date: Tue, 13 Sep 1994 18:16:53 +0200 (METDST)
Cc: www-html@www0.cern.ch
In-Reply-To: <9409131456.AA17052@hopf.math.nwu.edu> from "John Franks" at Sep 13, 94 09:56:49 am

John Franks writes:

 |On the other hand, if the document contains only <a name="marker">
 |with no close to the tag then browsers handle it in the desired way.
 |My point was that an illegal HTML construct functions while the legal
 |construct to achieve the same effect fails.  This provides a strong
 |incentive for document creators to write illegal HTML.  The fact that
 |the situation will be better with HTML 3.0 doesn't mitigate the
 |problem much.  Much of this bad HTML will still be around when HTML
 |3.0 browsers are common.  Those browsers will either have to handle an
 |illegal construct or fail to provide the behavior which older browsers
 |did.

Whether it is a bug in the current browser or not is a question of
philosophy, but I agree that it should behave differently. Newer
browser would do well to flag unmatched <a> tags as errors, but most
parsers will have no trouble doing the "right thing": an element ends
at the next tag that cannot be part of that element. Usually that
means that the content of the <a> is the rest of the paragraph.

 |There is still a need for a completely empty target.  Can one link
 |to a comment, for example?

I disagree. You have to link to something. Linking to a comment is
rather pointless, as is linking to an empty tag that has no other
purpose than to be a target. Neither contains any information.

If you write "see <something>" you're not referring people to a point
in a document, but to some non-empty part of a document. That's why in
HTML 3.0 you can link to most elements but not to <hr> or <br>. (And
why <a name=..> is non-empty in HTML 2.0.)

I can even envisage a server that makes use of this fact: send a URL
ending in "#fragment" and the server will only return that portion of
the document.


Bert
-- 
___________________________________________________________________________
####[ Bert Bos                     ]####[ Alfa-informatica,           ]####
####[ <bert@let.rug.nl>            ]####[ Rijksuniversiteit Groningen ]####
####[ http://www.let.rug.nl/~bert/ ]####[ Postbus 716                 ]####
####[                              ]####[ NL-9700 AS GRONINGEN        ]####
####[______________________________]####[_____________________________]####