Live data from Hacker News

Cool HTML elements nobody uses

tapajyoti-bose.medium.com

11–20 of 111 posts

Re: Cool HTML elements nobody uses

#12

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

I think because it was hard to write it manually unless you use something like Ultradev/Dreamweaver.

I remember wasting a lot of time making one fancy map, only to have people complaining about "where is the link to...?"

Re: Cool HTML elements nobody uses

#16
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's absolute positioning, which is unusable for the variety of devices we use today

5. detail/summary - it's also more content than design and has basically no support in content editors, but it has been growing in popularity in things like GitHub READMEs where only basic markup is allowed.

6. object - hard to know what filetypes will be supported and little feedback when they aren't. It usually safer to either include a JS reader with your site or just download the file.

Re: Cool HTML elements nobody uses

#18

I didn't know about datalist, but now I'll start using it. I've been annoyed at the multitude of completion implementations that all behave slightly differently.

i think the problem with datalist is the default styles, and the lack of customizability (eg if you want multiple slections, or to display descriptions or images next to each choice, or you want fuzzy matching). most of the time you'll just want to go ahead and import a ComboBox component someone else has made

Re: Cool HTML elements nobody uses

#19

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

They’re not actually that useful in practice.

The era of imagemaps was one where they were raster images at a fixed size, and when CSS wasn’t particularly good for interesting positioning and layout. Once you acknowledge viewports are extremely variable in size, there’s very little place left for imagemaps, and so people stopped making the kinds of designs that could benefit from it; and once you had alpha channels and better CSS and cross-platform vector graphics, there was even less place for traditional client-side imagemaps.

(As for server-side imagemaps, ismap, no one ever really used them. A few years ago I deliberately used them in order to just barely support JavaScript-free operation on a toy just for the sake of it, but they’re very much a solution looking for a problem these days.)

I haven’t used an actual client-side imagemap for years; what I have done is used SVG as a form of better imagemap, not least because you can actually target the areas with styles. The imagemap in the article is approximately equal to this:

  
      Workplace
      
          Computer
          
      
      
          Phone
          
      
      
          Cup of coffee
          
      
  
But just think, now you can add rules like `a:hover { stroke: blue; stroke-width: 2px; } a:focus { fill: lime }` (maybe with some filter or mix-blend-mode).
Post reply on HN