1997 called, they want their cool elements back.
Cool HTML elements nobody uses
91–100 of 111 posts
Re: Cool HTML elements nobody uses
#92Earlier 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…
Re: Cool HTML elements nobody uses
#93Earlier quoted context omitted.
I think they went out of style because they weren't javascript. But many older websites still use them to create fast loading, universally supported, interactive data visualizations that JS would still struggle to match. One of my favorites is the dynamic space weather visualization from Lockheed Martin Solar and Astrophysics Laboratory, https://www.lmsal.com/solarsoft/latest_events/
What's interactive about that example?
Re: Cool HTML elements nobody uses
#94Re: Cool HTML elements nobody uses
#95Earlier quoted context omitted.
Meter, progress and details/summary are from HTML5 so definitely not “very old”
I only bothered to check `details`, but that one dates back to at least the 2008 working draft of the HTML5 spec, which makes it ~14 years old - not absolutely ancient, but far from recent!
This was a significant dissuader, especially when you consider how you can’t transition the height (very often desirable) without added JavaScript. So has really only been seeing much use in the last few years.
(The minimum possible polyfill is just under 750 bytes, supporting IE9+/Edge, requiring to be provided, and disallowing text children of . The typical polyfill was more like 2–3KB.)
Re: Cool HTML elements nobody uses
#96and 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…
My experience is that superscripts/subscripts are normally on a different line to numerators/denominators. A couple of very simple examples to test this: ¹½₂ ({superscript one}{vulgar fraction one half}{subscript two}), ²2⁄1₁ ({superscript two}{digit two}{fraction slash}{digit one}{subscript one}).
Re: Cool HTML elements nobody uses
#97My 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.
> […] followed by either zero or more tbody elements or one or more tr elements […]
— https://html.spec.whatwg.org/multipage/tables.html#the-table..., the table element, content model.
Sure, the HTML syntax will imply it (and https://html.spec.whatwg.org/multipage/syntax.html#element-r... mentions this, how in HTML syntax `table > tr` is invalid), but this means that in XML syntax is actually valid.
I believe XHTML compatibility is the reason for this. But I have no real idea quite why XHTML 1.0 decided to allow (tbody+|tr+) (basically a mixture of HTML 3.2 and HTML 4) rather than tbody+ like HTML 4.
Re: Cool HTML elements nobody uses
#98My favorite (non-conforming, do-not-use) element is . It switches the browser's parsing context to "generic raw text"; it emits any "child" markup as-is, without parsing it. [0] https://jsfiddle.net/spdustin/y4m3qd71/1/
is also fun. Unlike you can't get out of it with a closing tag. Aside: plaintext is one reason browser DOM is a superset of HTML. By which I mean you can add to the middle of your DOM through JavaScript and everything is hunky-dory, but it's impossible to serialize the DOM to HTML so it'll HTML-parse back to the same DOM (at least if the serializer doesn't produce any JavaScript).
Re: Cool HTML elements nobody uses
#99I 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...
Re: Cool HTML elements nobody uses
#100Earlier quoted context omitted.
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…
> represented in most fonts instead as roughly "numerator/denominator" numbers instead of "proper" superscripts and subscripts My experience is that superscripts/subscripts are normally on a different line to numerators/denominators. A couple of very simple examples to test this: ¹½₂ ({superscript one}{vulgar fraction one half}{subscript two}), ²2⁄1₁ ({superscript two}{digit two}{fraction slash}{digit one}{subscript…