href attribute

Question is:

Is there any logical problems to allow any HTML element to have href
attribute thus behave as a hyperlink?

As far as I can see any element in HTML having ID attribute set can behave
as an anchor - be a hyperlink destination point - addressable fragment. So
why any element cannot behave as a hyperlink then?
...keeping in mind that CSS is ready for that - any element can have
pseudo-classes: :hover, :active, :link, etc. set.

Let's consider implementation of menu on web page as:
<ul>
  <li href="/item1.php">menu item #1</li>
  <li href="/item2.php">menu item #2</li>
  <li href="/item3.php">menu item #3</li>
</ul>

If <LI> has some rectangular style applied (with background and borders) it
is better to declare
this LI in the whole as a hypelink sensitive area rather than its textual
part like <a>menu item #1</a>.

Solution currently heavily used for this is to apply CSS's display:block for
the A attribute like:

a { display:block; background:...; border:...}
<ul>
  <li><a href="/item1.php">menu item #1</a></li>
</ul>
But this approach is a bit artificial/unnatural and creates some problems if
e.g. text is multiline and desired box size of the menu item is
significantly bigger than text size.

Does anybody know any previous discussions about this?

Andrew Fedoniouk.
http://terrainformatica.com

Received on Sunday, 4 July 2004 20:43:13 UTC