- From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Date: Thu, 29 Jan 2009 12:42:58 +0100
- To: Leif Halvard Silli <lhs@malform.no>
- Cc: HTML WG <public-html@w3.org>
Leif Halvard Silli wrote:
> Ian Hickson 2009-01-29 03.12:
>> On Wed, 28 Jan 2009, Roy T. Fielding wrote:
>>> If I ask a simple question, like:
>>>
>>> what does the name attribute on the "a" (anchor) element mean?
> [...]
>>> there is apparently no "name" attribute for <a> and, further, that <a>
>>> doesn't even mean anchor any more. Brilliant.
>>
>> It represents a hyperlink; is that no the same thing?
>
> "Little Webmaster, here is a little spoon for you. Open up, and take it
> in: HTML 5 was a fresh start from scratch. We did not look at HTML 4,
> and you shouldn't either."
>
> What the "a" element means is not attemted explained in the HTML 5
> draft. Wheras HTML 4 talks about "destination anchor" and "source
> anchor" - it incorporates the meaning of the element name when it talks
> about it.
Yes it is. As Hixie said, the spec clearly defines the a element as:
"If the a element has an href attribute, then it represents a
hyperlink.
If the a element has no href attribute, then the element is a
placeholder for where a link might otherwise have been placed, if it
had been relevant."
There we see it's defined as a *hyperlink* or a *placeholder for a
link*. And from an authors perspective, I'm sure it's easier to
understand what a link is than it is to understand the more abstract
concept of an "anchor".
Furthermore, the definition of hyperlink, which is immediately followed
by the definition of the href attribute, states:
"The a, area, and link elements can, in certain situations described
in the definitions of those elements, represent hyperlinks.
The href attribute on a hyperlink element must have a value that is a
valid URL. This URL is the destination resource of the hyperlink."
Here it is clearly stated that the href attribute gives the *destination
resource of the hyperlink*. How is that difficult to understand?
Looking at some HTML 4 tutorials and references, let's see how the a
element is commonly described:
"The A element denotes an anchor--a hypertext link or the destination
of a link. The HREF attribute specifies a hypertext link to another
resource, such as an HTML document or a JPEG image."
-- http://htmlhelp.org/reference/html40/special/a.html
Here we see that, while "anchor" is mentioned to say what it stands for,
the term "hypertext link" is actually used to describe it's purpose.
"The a element is usually referred to as a link or a hyperlink."
-- http://w3schools.com/tags/tag_a.asp
"Links are defined with the <a> tag."
-- http://www.w3.org/MarkUp/Guide/
"The a element is usually referred to as a link (not to be confused
with the link element, which has a different purpose), or even a
hyperlink"
-- http://reference.sitepoint.com/html/a
So, we can see that referring to the a element as a link or hyperlink,
or similar is relatively common. In fact, the term anchor isn't even
used on those last two pages. Therefore, it makes sense to use a common
term that more accurately describes it's function, namely linking, than
to stick with the alternative, anchor, just because it's the historical
reason for it being called the "a" element.
--
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Thursday, 29 January 2009 11:43:37 UTC