This content originally appeared on CSS-Tricks and was authored by Geoff Graham
Heydon on the virtues of hyperlinking hypertext in an anchor element:
Sometimes, the
<a>
is referred to as a hyperlink, or simply a link. But it is not one of these and people who say it is one are technically wrong (the worst kind of wrong).[…]
An
<a>
is an interactive element (well, it is if it has anhref
). The text inside an interactive element is sometimes referred to as a label since it should tell you what the element does. Since anchors take you places on the web, the text should tell you where you would be going or what you can do there.[…]
Web developers and content editors, the world over, make the mistake of not making text that describes a link actually go inside that link. This is collosally [sic] unfortunate, given it’s the main thing to get right when writing hypertext.
As far as where that anchor hyperlinks to, Jim Nielsen back in 2003 discussed a bunch of considerations that go into designing URLs. More recently, he’s mused on the the potential of well-designed URLs to change — or more accurately, the potential of humans to change things:
If a slug is going to be human-friendly, i.e. human-readable, then it’s going to contain information that is subject to change because humans make errors.
Swapping the contents of a URL is a breaking change. If we were to start with a wonderful URL like, say:
<a href=“css-tricks.com/almanac”>
…but decide that we now like “Docs” instead of “Almanac” then we might do this:
<a href=“css-tricks.com/docs”>
Naturally, we’d drop some sorta redirect on the server so that anyone attempting to hit /almanac
is automatically directed to /docs
instead. But now we’ve got a form of technical debt to maintain that may not be any more dangerous than walking and chewing gum at the same time, but could become a mouthful much later. We’ve got a gazillion redirects on CSS-Tricks for a gazillion different reasons, most often for totally human reasons like typos. Remember the CSS-Tricks Chronicles we used to write? Botching the Roman numeral numbering system on those was standard fare. Look at the very last edition from 2001, titled “CSS-Tricks Choronicles XLI” and its URL:
https://css-tricks.com/css-tricks-chronicle-xxxxi/
🥸
I’ve been thinking about this a lot while attempting to organize the 7,000 some-odd articles on this site. For years, we’ve maintained a “flat” structure in the sense that the title of an article becomes the URL (after, perhaps, with some light editing):
<a href=“css-tricks.com/geoff-is-on-another-dumb-rant”>
But I’m starting to think about the content on this site in terms of type rather than title alone. For example, we’ve always had “articles” on this site with a smattering of “links” sprinkled in alongside Almanac “entries” and “guides” among other categories of content. We’ve just never reflected that in our URLs because, well, the design is flat. Adding another layer for the type of content borks the original URL!
<a href=“css-tricks.com/soapbox/geoff-is-on-another-dumb-rant”>
Jay Hoffman has been thinking about this, too.
A dead link may not seem like it means very much, even in the aggregate. But they are. One-way links, the way they exist on the web where anyone can link to anything, is what makes the web universal. In fact, the first name for URL’s was URI’s, or Universal Resource Identifier. It’s right there in the name. And as Berners-Lee once pointed out, “its universality is essential.”
[…]
Time and time again, when the web goes into crisis and part of it is lost, the Internet Archive and similar efforts come to the rescue. But even the Internet Archive is having a hard time protecting against a barrage of link rot we can’t seem to get away from.
All of this dovetails into recent reporting that Google has decided to sunset its URL shortener. All of those goo.gl
URLs accumulated since the shortener was introduced in 2018?
Any developers using links built with the Google URL Shortener in the form https://goo.gl/* will be impacted, and these URLs will no longer return a response after August 25th, 2025. We recommend transitioning these links to another URL shortener provider.
There’s some minutiae of consolation for Google itself:
Note that goo.gl links generated via Google apps (such as Maps sharing) will continue to function.
To be clear, this move is less a form of link rot than it is a straight-up pruning to cut things off. If link rot is akin to allowing your hair to go gray, then deprecating Google’s URL shortener is a total head shave. Nick Heer believes there’s a good side to it, however:
In principle, I support this deprecation because it is confusing and dangerous for Google’s own shortened URLs to have the same domain as ones created by third-party users. But this is a Google-created problem because it designed its URLs poorly. It should have never been possible for anyone else to create links with the same URL shortener used by Google itself.
I tend to agree. The whole situation is a Rosemary’s Baby predicament presenting two terribly uncomfortable choices. The right uncomfortable decision was made, but we still have to deal with the repercussions of wiping out part of the web’s context.
Heydon’s post led me down this rabbit trail, so I’ll link it up here for you to take a hike with it.
To Shared Link — Permalink on CSS-Tricks
(Hyper) Links About (Hyper) Links originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.
This content originally appeared on CSS-Tricks and was authored by Geoff Graham
Geoff Graham | Sciencx (2024-08-02T16:41:54+00:00) (Hyper) Links About (Hyper) Links. Retrieved from https://www.scien.cx/2024/08/02/hyper-links-about-hyper-links/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.