1 hour ago · Tech · 0 comments

A link is just a button that takes you somewhere when you click it right? <style> span { text-decoration: underline; color: #44EEEE; } </style> <span onclick="window.location='https://xkcd.com/'">100% legit link</span> 100% legit link Except that's a pale, shallow imitation of a link. A real link can be: Opened in a new tab. (ctrl) ... or a fresh window. (shift) ... or saved as a file (alt). Copied as a URL (right click) Used with the keyboard (tab + enter) Seen by tools like search engines and screen readers. Hovered over to see the URL. ... none of which work with a button. Another common offense is to use a real link, but hook the click event to open a popup. However, with a real <a target="_blank"> link, I can: See the loading progress... ... or/and cancel it. ... see descriptive error pages and retry if needed. Open multiple at once. Read the original page while it loads. Use my browser's tabs or/and window manager to organize them. Bookmark the page. Copy the URL and send it to…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.