Re: HTML is a declarative mark-up language

Lachlan Hunt wrote:
> 
> 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?

If coming to that fresh, it is fairly straightforward.  But if you have 
any history or take a look at any non-trivial subset of existing web 
pages, it is either a bit confusing or incomplete.

One other use anchor elements used to have is as a target of a link. 
That usage may not be considered conforming, but it still is in wide 
use.  Many pages will duplicate the value of id attributes as name 
attributes and put both on <a> elements because some browsers which now 
enjoy at most trace market share do not support id.

Clearly the trend now is to associate URI fragment identifiers with HTML 
id attributes, and id attributes that can serve as the target of a 
hyperlink can appear on many elements, and not just ones that are named 
<a>.  The current draft for "HTML 5: A vocabulary and associated APIs 
for HTML and XHTML" choses to focus on providing the information as to 
why this element is unique.

One place where the information that Roy would have found helpful could 
be found is here:

   http://dev.w3.org/html5/html4-differences/#absent-attributes

Ian's draft has been criticized as being monolithic, which some view as 
a virtue and others a vice.  The truth is that the document represents 
but one possible way of organizing this information, and we don't yet 
know whether that way is ideal.

- Sam Ruby

Received on Thursday, 29 January 2009 12:34:17 UTC