by jchw · 2y ago · 0 comments
- <blink>
- <marquee>
- <tt>
- <center>
- <frame>
- <frameset>
That said, it accepts both <object> and <embed>, which I found moderately surprising, since I thought that those were mostly only used for ActiveX and NPAPI plugins. Maybe the last major round of deprecations for HTML came just a tad too early to kill them off, or maybe there is more to them than that.
Some tags I feel are underrated in handwriting HTML that are still in the spec: <figure> and <figcaption>, good for semantically representing images with captions. <thead>/<tbody>/<tfoot>, semantically segments a table; In theory could be used by assistive technology, or possibly renderers that need to paginate HTML and want the table headers to repeat on each page (does any agent do this?). <picture> + <source>, pure-HTML method of having responsive images in an HTML page, can support a fallback for browsers that don't support it, too. On that note, the srcset and loading attributes of img are very useful too, srcset as an alternative to <picture>, ostencibly aimed at use cases where the different sources are identical aside from pixel density (vs <picture> which is meant to contain potentially more significantly different images for different responsive layouts.)
I wonder which things I missed. That would be a nice feature to add.
(I know I missed a few table elements because I just thought of colgroup while typing this.)
I think/hope/believe that even though these elements fell out of grace of the standard bodies [1] long time ago, implementers simply cannot go against backwards compatibility here and remove them like spec suggest and MDN scaremongers that it "was not implemented in a consistent way" [2], yet last time I checked, the support in major browsers was pretty solid [3].
- [1] yet https://html.spec.whatwg.org/multipage/obsolete.html#xmp tells still acknowledges that "User agents must treat xmp elements in a manner equivalent to pre elements in terms of semantics and for purposes of rendering. (The parser has special behavior for this element though.)" - [2] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/xm... - [3] https://github.com/mdn/browser-compat-data/issues/2168#issue...
E.g. I once built a logo element, where the logo may be either at logo_A.jpg, logo_B.jpg or logo_C.jpg. As there wasn't any API to determine which of them would exist in advance, I instead used three nested <object> tags. They would request the image in sequence, and the first one that would respond with an image is displayed.
> NB: we've left a SQLi vuln in this site. If you're smart enough to find it, congrats: you're a mod.
That's certainly a creative approach.
What's even more fascinating about <q> is that it is localized too! Wow!
Check it out. If you do...
<p lang="en"><q>My English quote</q></p>
you will of course get... “My English quote”
But, if you do... <p lang="ja"><q>日本語の引用</q></p>
Then you get: 「日本語の引用」
Magic!There's only one real problem I have with this: it seems to be implemented on the layout-level using ::before and ::after pseudo-elements, and thus the quotation marks are intangible. That's a real bummer, which has the result of making the quotation marks not able to be copied or selected (and their visibility to screen readers may also be impacted?)
So unfortunately, for now, I am going to continue using good ol' ldquo and rdquo. But, that's pretty neat.
(Although that never really worked.)