Live data from Hacker News

Cool HTML elements nobody uses

tapajyoti-bose.medium.com

71–80 of 111 posts

Re: Cool HTML elements nobody uses

#71
MAP and AREA have been around since the 90's, but METER/PROGRESS? I never noticed those sneak into HTML. I've been using Bootstrap for ages. Cool.

SUP and SUB I find don't work very well with glyphs, but work fine with standard Latin characters.

Re: Cool HTML elements nobody uses

#72
post #28

My favorite obscure useful HTML elements: , , , / / , / / / .

I don't think tbody is really obscure to anyone writing with DOM. You can't embed a tr into a table: it has to be in a thead/tbody/tfoot. If you're writing HTML it's fine, the browser does it for you. But if you're writing DOM (directly or indirectly with e.g. React) you need to use the tbody tag or else it won't do you what you wanted.

Re: Cool HTML elements nobody uses

#73

Having used all of these in the past, here's why this is the case: 1. meter/progress - default style looks dated, styling works different on different browsers, the color scale options are confusing 2. sup/sub & 7. abbr - these are only useful for page content (as opposed to site design), which is usually WYSIWYG or something like Markdown. Many editors/parsers don't support it, at least by default. 4. map/area - it'…

That was my first thought... if people don't use these very old elements any more, there's probably a good Chesterson's fence-type reason. Frames seemed really cool when I first saw them too, until I actually started trying to support them.

Meter, progress and details/summary are from HTML5 so definitely not “very old”

Re: Cool HTML elements nobody uses

#74
post #23

Earlier quoted context omitted.

This and were so overused that browsers started to show them without any animation

A couple years ago I went looking for JS marquee replacements and zero of them I could find would deliver the same functionality as Functionality's gone, it seems. Evidently it's hard to replicate all of it because none of the options I could find managed it.

You don't need javascript to replace marquee tags. There are a plethora of implementations using CSS animation.

Re: Cool HTML elements nobody uses

#75
post #74

Earlier quoted context omitted.

A couple years ago I went looking for JS marquee replacements and zero of them I could find would deliver the same functionality as Functionality's gone, it seems. Evidently it's hard to replicate all of it because none of the options I could find managed it.

You don't need javascript to replace marquee tags. There are a plethora of implementations using CSS animation.

If you just want stuff to scroll, sure, but it's got a lot of features:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ma...

I just know that when I went to try to make a marquee using some of these features a couple years ago, I couldn't find anything pre-made that could do what I wanted, which was nothing more than what could do, so it was going to be a lot of custom work. Which surprised me, I expected someone to have perfectly re-created the whole tag just for giggles if nothing else. There were tons of partial solutions, but nothing that was a complete replacement.

Re: Cool HTML elements nobody uses

#76

Earlier quoted context omitted.

That was largely iframes, though they are still in use for some things like certain methods of ad delivery. frames/framesets were often about partial updates, but mostly where script wasn't wanted so AJAX (once available) wasn't an option either.

Having lived through that era, Frames (and Framesets) were mostly killed by the proliferation of PHP on cheap hosts. A lot of Frames were used for building navigation elements without a lot of copy/pasting between HTML files (headers, footers, navigation bars, etc). The alternative to frames was either copy/pasting or ancient early static site generators. When PHP became common and cheap most people moved to server-s…

>but not returned to frames

also, CSS Flex

Re: Cool HTML elements nobody uses

#78

and has the problem that they change the line height. So if you have an paragraph and one line contains "Nice ground with 42 m² grass" then that line is taller than all the other lines, which makes it rather ugly. So I automatically converts all m 2 and similar into the unicode symbols: https://en.wikipedia.org/wiki/Unicode_subscripts_and_supersc...

Though it useful to point out that the Unicode superscripts and subscripts were also originally intended to be ascenders/descenders (which in the strictest sense would also affect line height) are as represented in most fonts instead as roughly "numerator/denominator" numbers instead of "proper" superscripts and subscripts.

The W3C recommends to prefer the markup versions, and various years the Unicode committee has also suggested not to use the Unicode versions except in backwards compatibility with old ISO codes and in certain semantically more meaningful situations as "single words" (chemistry formulas more so than math, for instance). Though the Unicode recommendations have waffled back and forth over the years. Both have recommended it in part because of metadata available to screen-readers for accessibility.

Not that you always have to follow such recommendations from groups such as these, just that it is useful to know what the recommendations are. Also as others pointed out, some CSS stylesheets are better than others at line-height of sub/sup markup and while the default styles are kind of awful, it is useful to know there are CSS options.

https://en.wikipedia.org/wiki/Unicode_subscripts_and_supersc...

Re: Cool HTML elements nobody uses

#80

Having used all of these in the past, here's why this is the case: 1. meter/progress - default style looks dated, styling works different on different browsers, the color scale options are confusing 2. sup/sub & 7. abbr - these are only useful for page content (as opposed to site design), which is usually WYSIWYG or something like Markdown. Many editors/parsers don't support it, at least by default. 4. map/area - it'…

> default style looks dated

Browser defaults for all HTML elements look "dated". The visual appearance of meter, as with all elements, is adjusted via CSS.

> . map/area - it's absolute positioning, which is unusable for the variety of devices we use today

It's relative to the image dimensions, not the page/viewport.

Post reply on HN