Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

href attribute

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sun, 4 Jul 2004 17:42:50 -0700
Message-ID: <003601c46229$000befe0$0401a8c0@ATHLON>
To: <www-html@w3.org>

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 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.