Hacker News new | ask | show | jobs
by gushogg-blake 697 days ago
I was at least vaguely aware of <base>. No idea what <samp>, <track>, <dfn> or <del> do. Also apparently <ruby> is not for embedding Ruby scripts: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ru...
5 comments

<samp>, <var>, <kbd> are definitely weird ones. Maybe <kbd> would be more useful with some better default styling. I think <output> has some accessibility wins but I've never seen someone use it. <dfn> is a good pick, <abbr> is also up there with questionable semantic tags. <del> and <ins> are basically tailor-made for rendering diffs. <ruby> is really useful for Japanese, doing that styling manually would be a huge pain, but niche for sure. I'm happily surprised <small> survived. I still miss <center>.
<dfn> - I was going insane trying to remember that one! I tried <def>, <definition>, <define>...
I tried the exact same three! Eventually gave up on that path, thinking "I could swear HTML had some way to have a glossary...", and of course seeing it does after revealing the answers
samp and kbd are good for marking up terminal sessions e.g. https://j4e.name/articles/marking-up-terminal-in-html/
I got <ruby> simply because I kept seeing it in the list of tags back in the days when I used W3Schools, this useless knowledge stuck with me until today. Same for <bdi> and <kbd>. No idea what they do.
If one play/work with audio/video streaming. the <track> tag will be something that came across.

And if you deal with Japanese website development, <ruby> and associated tags will came across, though less often.

<dfn> is important when writing mathematical texts. I use it all the time.