Today it occurred to me that, after a little over ten years of basic fluency in HTML, I have absolutely no idea why the href attribute is named “href”. Why not “url”, “link”, or even just “ref”?
I found no mention of name origin in the HTML recommendation, which has the following to say about the attribute:
This attribute specifies the location of a Web resource, thus defining a link between the current element (the source anchor) and the destination anchor defined by this attribute.
Not a single “H” word. The remarks in the HTML 4.01 DTD provide more naught:
href %URI; #IMPLIED -- URI for linked resource --
Its not hard to make an educated guess, of course, but I was hoping for something canonical. Here’s what I came up with in order of what I'd like “href” to mean:
- Hypermedia Reference
- Hypertext Reference
- Heraldo Refera (sp., I know, thanks. It works better this way.)
- HTTP Reference
- Hyperlink Reference
- HTML Reference
I could live with both “hypermedia reference” and “hypertext reference” but not “hyperlink reference” or “HTML reference”. The former implies that “href” references a hyperlink (which it doesn’t) and the latter implies that what you are referencing will always be HTML.
And after a bit more digging, I think it’s probably safe to rule out “HTML Reference” entirely. Early alt.hypertext discussion around the WorldWideWeb (WWW) project makes no mention of HTML whatsoever. (I forgot that the term “hypertext” had been around way before HTML was invented [1965]). Here’s an excerpt of TimBL pitching the web in 1991:
We also have code for a hypertext server. You can use this to make files available (like anonymous FTP but faster because it only uses one connection). You can also hack it to take a hypertext address and generate a virtual hypertext document from any other data you have – database, live data etc. It’s just a question of generating plain text or SGML (ugh! but standard) mark-up on the fly. The browsers then parse it on the fly.
Tim had a nasty itch there, didn’t he? Good thing he scratched it.
“Hypertext Reference” would seem to be the most likely original expansion of “href”. Can any of you old-timers confirm or deny this or have any recollection of the name’s origin?
UPDATE 1: It looks like HREF originally stood for something much less obvious. See comments for some interesting discussion on “head anchors”.
UPDATE 2: It would appear that we have it from the horses mouth now:
… “A” is for “anchor”, “HREF” is for “hypertext reference” …
Thanks to David Håsäther for digging up the obscure reference. We can all sleep a little easier tonight. Maybe…
UPDATE 3: Anyone with even the slightest interest in this stuff should take a look at Sean Palmer’s Early History of HTML – 1990 – 1992. It’s a short, meaty timeline packed with great information, including info on the earliest HTML document on the web and a first implementation of hypertext by TimBL: HyperText.m.
Huge thanks to Dan Brickley for leaving the link in the comments.
Discuss
I always assumed it stood for “hypertext reference.” As you said, the “hypertext” term has been around for a very, very long time (longer than computers themselves), and besides, it’s the thing that the “HT” in both “HTTP” and “HTML” stands for.
“Hypermedia” is a much more recent coinage, and to be honest it would weird me out if that really was the right expansion.
— Aristotle Pagaltzis on Sunday, March 09, 2008 at 05:55 AM #
http://acronyms.thefreedictionary.com/Hypertext%2BReference
Don’t know how authoritive one should take that but there are several other similar definitions.
http://www.google.com/search?q=hypertext%2Breference
— njharman on Sunday, March 09, 2008 at 06:17 AM #
It seems all your good guesses are wrong and the “h” in “href” stands for “head”. Hyperlinks were imagined as having two “anchors”, a “head anchor” and a “tail anchor”. The hyperlink went from the tail to the head. So the href was the “head reference”.
http://www.w3.org/MarkUp/html-spec/html-spec_5.html#SEC5.7.3
— Christoph on Sunday, March 09, 2008 at 08:17 AM #
That “hypertext reference” google search has some interesting results. It seems that there was a period where the words “link” and “hypertext reference” were used almost interchangeably. Here’s Mark Andreessen explaining links in 1993:
It would appear “hypertext reference” was a prevalent term around this time. I wonder what happened. Too geeky?
Maybe they decided to throw out “hypertext reference” with “information superhighway”…
— Ryan Tomayko on Sunday, March 09, 2008 at 08:21 AM #
http://en.wikipedia.org/wiki/Href
— anon on Sunday, March 09, 2008 at 08:48 AM #
Christoph: Wow! That’s pretty convincing. I think you're probably right. I'm still digging around but here’s another part of the same HTML 2.0 draft that goes into a bit more detail:
http://www.w3.org/MarkUp/html-spec/html-spec_7.html
Now I need to get some sleep but I can’t seem to get this head/tail language straight in my head for some reason. There’s more:
So, an A element is a “tail anchor” and the
hrefattribute is a reference to a “head anchor”, which can be any of the things listed in that last sentence. Okay, I guess that makes sense.No wonder they scrapped this language. Talking about links in these terms seems to require the same part of the brain as pointer arithmetic :)
Also, the [DEXTER] reference is to the following (which I feel like I was probably exposed to at some point but don’t remember):
PDF and HTML. I'm digging in now.
— Ryan Tomayko on Sunday, March 09, 2008 at 08:49 AM #
Here is a document by TimBL, which says “… “HREF” is for “hypertext reference"”: http://www.w3.org/Provider/ServerWriter.html
He should know.
— David Håsäther on Sunday, March 09, 2008 at 10:52 AM #
Some more HTML archeaology from Sean Palmer is here: http://infomesh.net/html/history/early/
— Dan Brickley on Wednesday, March 12, 2008 at 04:52 PM #
Leave a comment