Live data from Hacker News

Cool HTML elements nobody uses

tapajyoti-bose.medium.com

61–70 of 111 posts

Re: Cool HTML elements nobody uses

#61

Earlier quoted context omitted.

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.

Frames died when AJAX became available. People were bastardizing frames so that they could change the content in a window without refershing the entire window.

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.

Re: Cool HTML elements nobody uses

#62

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...

> 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.

normalize.css fixed this problem by setting the line-height to 0 and using position relative.

https://github.com/necolas/normalize.css/blob/master/normali...

Re: Cool HTML elements nobody uses

#63
post #23
post #17

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.

Re: Cool HTML elements nobody uses

#64
sup and sub are quite common, I think.

map and area was how I was taught to write websites like 20 years ago (whew!).

Thanks a lot for meter and progress, though! I didn't knew about those, they will def. save me a lot of time in the future (I always end up implemented my own progres bar and it's a PITA).

Re: Cool HTML elements nobody uses

#65
post #7

I am old enough to remember development when image maps were still common for things like headers and big hero homepage navigation images. I'd like to add which acts like an img tag and submit button that submits the clicked X and Y essentially as two separate inputs Here's an MDN example showing X and Y position in GET string on click. - https://mdn.github.io/learning-area/html/forms/image-type-ex...

Image maps unlocked expression on the web for me when I was a kid. I enjoyed coding websites, but felt creatively limited by what I knew to be possible with simple HTML and CSS. When I realized I could turn any graphics I made into live web elements without having to fit adjacent pieces into a layout I could simulate with tables, I felt I could finally make a website that reflected my artistic self. I think I publish…

i remember slicing images into rectangles which could be fit into a table. stole some portrait photograph of a woman, maxed out contrast, color reduction + dithering, then drew the eyes shut and make the open/close frames into gifs with different timings. the result: an image of a women who blinked both eyes independently, without the use of css and js.

the outcome wasn't planned, it just happened - but it was so funny i still have to laugh all those years later.

Re: Cool HTML elements nobody uses

#68
might sound like a good idea, but it tends to be inconsistent between browsers [1]. It also doesn’t work on Firefox on Android (both Focus and standard). It was also broken in web views on Android for 1.5 years [2].

[1]: https://chriswarrick.com/blog/2020/02/09/when-html-is-not-en... (disclaimer: my blog post, from 2 years ago, although most of the issues apply today) [2]: https://bugs.chromium.org/p/chromium/issues/detail?id=949555

Re: Cool HTML elements nobody uses

#69

Earlier quoted context omitted.

Frames died when AJAX became available. People were bastardizing frames so that they could change the content in a window without refershing the entire window.

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-side inclusions. These days we've come full circle back around to static sites but not returned to frames simply by how much static site generators have either become more common and/or easier/better to use.

Re: Cool HTML elements nobody uses

#70

> 4. map & area These take me back, but I'm trying to remember why I stopped using them. Did they go out of fashion? Or was it accessibility related?

Responsive reasons. Hardly ever can you do full absolute positioning.

I think they died well before responsive became a concern. Their heyday was really the time before not just CSS but even tables, at which time they were the only way to have links positioned in space rather than in flowing text. I don't think anyone liked imagemaps - it's just that there was no alternative.

But their limitations were massive. Chiefly, in a period when dialup internet was becoming more common, an image map meant that before a user could interact with your website, they had to wait for a very slow download of a very large image that contained mostly text. You couldn't interact with them any more - no ability to select the text in them, or perhaps the reader had a different color/font preference? Tough luck.

When tables came out, they began to face competition, but they weren't defeated. Aside from table-first designs that mixed images and text, you could mostly do without imagemaps by cutting the image up, eliminating table borders/cellpadding/cellspacing and making careful use of colspan and rowspan, with a part of the image in each cell. This had most of the same user-side problems as imagemaps, but was easier for many people to maintain (I'm not sure quite why: I assume some people have trouble with thinking in terms of x/y coordinates and regions).

CSS thoroughly destroyed them. Everything an image map could do, tables+CSS and eventually CSS could do better. This was still ages before responsive became a concern, at a time when webpage maintainers would assume you used an 800x600 or 1024x768 screen with a maximized window and just ignore everyone who didn't match that.

Nowadays, any time an image map might look like the solution, the actual solution is SVG, which gives you everything an image map had but is moreover correct.

Post reply on HN