[whatwg] Simple Links
ash at ashleysheridan.co.uk
Tue Mar 30 15:28:32 PDT 2010
On Tue, 2010-03-30 at 23:44 +0200, Christoph Päper wrote:
> If you think about various syntax variants of wiki systems they’ve got one thing in common that makes them preferable to direct HTML input: easy links! (Local ones at least, whatever that means.) The best known example is probably double square brackets as in Mediawiki, the engine that powers the Wikimediaverse. A link to another article on the same wiki is as simple as “[[Foo]]”, where HTML would have needed “<a href="Foo">Foo</a>”.
> I wonder whether HTML could and should provide some sort of similar shortening, i.e. “<a href>Foo</a>” or even, just maybe, “<a>Foo</a>”. The UA would append the string content, properly encoded, to the base Web address as the hyperlink’s target, thus behave as had it encounters “<a href="Foo">Foo</a>”.
> I prefer the binary toggle role of the ‘href’ attribute, although it doesn’t work well in the XML serialisation, because it provides better compatibility with existing content and when I see or write “<a>Bar</a>” I rather think of the origin of that element name, ‘anchor’. So I expect it to be equivalent to “<a id>Bar</a>” and “<a name>Bar</a>” which would be shortcuts for “<a id="Bar">Bar</a>”.
> PS: Square brackets aren’t that simple actually, because on many keyboard layouts they’re not easy to input and might not be found on keytops at all.
> PPS: The serialisation difference is not that important, because XML, unlike HTML, isn’t intended to be written by hand anyway.
I think to me <a>foo</a> would indicate it is a named anchor in a page.
Are all UA's intelligent enough to be able to accurately recognise any
form of URL? Also, in XHTML the tag would look like <a
And, shouldn't links be as semantic as possible? Consider these two:
* find the latest spec at <a
* get <a href="http://www.somespecsite.com">the latest spec</a>
In my opinion, the second one is far more semantic, and is what I prefer
to use on anything I put together. The HTML spec should encourage the
best practices, and making shorter link tags that actually take a step
backwards in the world of semantic markup just seems a little foolish.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg