Article may be outdated

This article is 63 days old. Some details may have changed since publication.

Hacker News·5 min read·medium

The Difference Between a Button and a Link

A
alexpetros
✦AI Summary

The author proposes adding 'action' and 'method' attributes to HTML buttons to standardize how they handle requests. The article argues that buttons and links serve distinct semantic purposes, with links representing destinations and buttons representing actions.

Why it matters

Standardizing button behavior could improve web accessibility and browser-native functionality for interactive elements.

✦Dive DeeperCreate a free account to unlock

Of the three proposals in the Triptych Project , my multi-year odyssey to add a few small-but-powerful features to HTML, the one that generates the most questions is Button Actions . The proposal itself is very straightforward: we want to add the action and method attributes to the button.

< button action =" /begin " method =" GET ">Start</ button > Button Actions are such a simple primitive that people often ask why they’re needed. The answer rests on a distinction that web users intuitively understand but rarely have to think about directly: the difference between a button and a link.

I added a detailed “Buttons vs Links” section to the proposal, but I think it deserves a blog-style explanation as well, because most of the existing ones miss the mark.

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technologydesign
✦

Get smarter about the news

Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.

Create free account

Already have an account? Sign in