Why is everyone hostile to the <a> tag? Has it served us badly?
![Shocked :shock:](./images/smilies/icon_eek.gif)
Moderator Edit: There are no such things as "tags" in (X)HTML. Please use the correct terminology, thanks! - JAB Creations
It is currently Sat Dec 02, 2017 4:21 pm Advanced search
Linking: In HTML 3, only a elements could be the source and target of hyperlinks. In HTML 4 and XHTML 1, any element could be the target of a hyperlink, but still only a elements could be the source. In XHTML 2 any element can now also be the source of a hyperlink, since href and its associated attributes may now appear on any element. So for instance, instead of <li><a href="home.html">Home</a></li>, you can now write <li href="home.html">Home</li>. Even though this means that the a element is now strictly-speaking unnecessary, it has been retained.
The specified algorithm for HTML parsing supports putting the a element around paragraph (block) level elements. It’s just the definition of the element that forbids this at the moment, but that should be fixable.
<html>
(...)
<body>
<a name="up"></a>
(...)Few pages of text(...)
<a href="#up">Go to the up</a>
</body></html>
You could replace it with <a id='up'></a> or even <body id='up'>.Aidan wrote:Hi
This is my old code:
- Code: Select all
<html>
(...)
<body>
<a name="up"></a>
(...)Few pages of text(...)
<a href="#up">Go to the up</a>
</body></html>
I want to make it waild with html5.
I know I must remove "<a name="up"></a>" but what i should use to replace it?
Yes I know my english is not good.
JAB Creations wrote:1.) There is no such thing as a "tag", the correct terminology is element.
<a href="http://www.whatwg.org/">WHATWG</a>
JAB Creations wrote:I also question the direction XHTML 2 is headed
Users browsing this forum: No registered users and 1 guest