Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
lrem
4y ago
0 comments
Save
Share
You don't get HTML. Neither do I. A couple years back there was a well-received "semantic HTML" submission here. I was in the small minority wondering how come `<div class="button">` is better semantics than `<button>`.
0 comments
4 comments · 2 top-level
top
newest
oldest
baliex
4y ago
· 2 in thread
This page is a pretty convincing argument for why <button> is the right element:
https://www.buttoncheatsheet.com/
iudqnolq
4y ago
It's not quite right though. You need
<button type=button
if you don't want it to have submit semantics (including submitting the containing form if you happen to have it in one).
pc86
4y ago
And this thread right here is why we can't have truly semantic HTML, and why the thing most people tout as "semantic HTML" today... isn't.
1 more reply
benibela
4y ago
XML would be truly semantic
j
/
k
navigate · click thread line to collapse