HTML5 says it "must not be used by authors", but it still describes it as a tag, and describes what an implementation must conform to. I guess it's open to interpretation what "valid" means. But it is an HTML tag described by the HTML standard (both HTML5[1] and the WhatWG HTML spec [2])
It's funny, I've been working with HTML since 1998, and I got 36 (though I do think <font> should've been allowed). I thought I'd do a lot better, but I guess you can accomplish a lot with only a few tags, CSS, and some minimal JavaScript.
Apologies, I knew where and how to look them up. And, seeing the list, only a few I did not know. Some I couldn't remember the abbreviation used in the tag. I just didn't have enough curiosity to actually look them up. :D
I got to 42 and forgot about font (and center, mentioned elsewhere). But quite a lot of tags weren't valid, such as marquee. I wonder if I broke 50 including those.
For what it's worth, I started writing HTML when dates began with the prefix 19... though most of my career has been on the server side.
> <plaintext> is also a real HTML element. It was deprecated in HTML 2 back in the mid-1990s. What's particularly interesting is that the element cannot be closed.
> what's particularly interesting is that the element cannot be closed
I got to 57 before running out of tags that I use at least once a year. Had an "Oh yeah" moment when I realized that I'd forgotten html, head, title, body, script, style, and meta.
<samp>, <var>, <kbd> are definitely weird ones. Maybe <kbd> would be more useful with some better default styling. I think <output> has some accessibility wins but I've never seen someone use it. <dfn> is a good pick, <abbr> is also up there with questionable semantic tags. <del> and <ins> are basically tailor-made for rendering diffs. <ruby> is really useful for Japanese, doing that styling manually would be a huge pain, but niche for sure. I'm happily surprised <small> survived. I still miss <center>.
I tried the exact same three! Eventually gave up on that path, thinking "I could swear HTML had some way to have a glossary...", and of course seeing it does after revealing the answers
I got <ruby> simply because I kept seeing it in the list of tags back in the days when I used W3Schools, this useless knowledge stuck with me until today. Same for <bdi> and <kbd>. No idea what they do.
I gave it some thought but it's hard to say. For most of the ones I missed and mentioned in sibling threads, I can think of people who'd be aware of them:
- Probably <ruby> and related tags are used in Japanese and other spheres with such a language feature
- <base> I knew of, I thought archive.org used it but apparently not currently. Probably if you work with archived or otherwise namespaced content, you can reasonably find this a very familiar element
- <track> if you're a media person, doesn't seem that outlandish
- <dfn> I knew of basically, but just couldn't recall the names for glossary tags
- <kbd> is used all the time on Superuser (in Markdown, where HTML is valid though of course they filter most of it)
- Some others that I didn't remember, like <template> and <article>, were just stupidity. I know these...
This leaves <del> and <ins>. There are enough diffing tools, but it's not as big a category of software people constantly work on, especially since this is only for browsers. I'd not be surprised if these are the most-forgotten elements
Or does anyone still use <map>? I saw it in the HTML tutorial (linked from a Dutch magazine) that got me into programming so I know of it and remembered while doing the quiz, but it's fairly far faded from my mind and I'm not sure anyone would ever use it when, if you want this sort of functionality, you'd probably want the versatility of JavaScript
I swear Google has published a report from their crawl data about how in/frequently different tags and frameworks were used, in part to determine what they might need to support in Chrome. I'm not able to find this anymore. Does anyone know what I'm talking about?
This is the one that Hixie published back in 2006. It helped guide a lot of the early decision-making in the WHATWG when it came to proposing new tags for HTML5 in a bid to reduce the number of div's out there:
const elements = [
"html",
"body",
"head",
"link",
"meta",
"marquee",
"script",
"style",
"blogroll",
"constructionsign",
"guestbook",
"webring"
];
// The above array was a decoy. You weren’t peeking at the array were you?
// Now the real array with all elements via
(edit: Multiple people have interpreted this comment in a way which makes them think I'm complaining about the semantics and one even seems to think I am "advocating for" using the wrong semantic... I am merely complaining about the chosen tag name and how much longer the much-later-added tag we all are supposed to use is than the tag which is in some sense--not technically, but morally--deprecated, as it undermines being able to use HTML as a true markup rather than a rendering target. If you find yourself thinking I'm against using <strong> and are somehow pro-<b>, maybe re-read the comment or go read some of my other much-longer explanations I've been <strong>-armed ;P into providing down-thread. FWIW, I do at least see how my comment was a bit confusing.)
Doing this reminded me how angry I am that I am supposed to use "<strong>...</strong>" instead of "<b>...</b>". The verbosity overhead in a normal document of markup littered with five-character tags for something as basic as a keyword is sufficiently worse than one-character tags that it drives me to want to use something like Markdown (but then I am angered that it went with *...* and **...** instead of /.../ and *...* and I just start to give up on other peoples' tooling entirely).
"bold" is a style, and perfectly fine to use for any word that you want to apply that style to.
"strong" is an intention and allows other things to define what style(s) that intention should be represented with.
It's not often that you want to represent something as a "bold" style without representing it as having strong emphasis, but there are times. A header is a good example of a place where you might want the header to be styled bold, but strongly emphasize a single word in the header. Since <header> doesn't apply the styles that - say - h1 does, it would be perfectly reasonable to script your header as
```
<header><b>The <strong>Worst</strong> Case Scenario</b></header>
```
... especially if you didn't want all of your headers to have a bold style applied.
Obviously there are a few other edge cases but I will admit that the vast majority of the times would naturally call for a strong tag, over a bold tag. And for those majority cases, I'm really glad that it's "strong" rather than bold, because "strong" is meaningful in different ways than "bold" and it always makes more sense, to me, reading it back as html telling me how I should interpret the word, rather than just how it should look.
I am not complaining that it is "strong" instead of "bold" or that we have two separate tags, and I'd be perfectly happy if bold had never existed: certainly, if I actually wanted to use <b>, it isn't like anyone removed it from either the browser or the HTML standard... it is, in fact, that I agree with everything you wrote about the semantics of the situation which is why I even have a reason to be angry when I'm trying to read my hand-written markup.
Instead, I am complaining that we got to allocate a one-character tag to bold and then when we realized that we screwed that up we allocated a FIVE-character tag to strong. Hell: we hadn't even run out of one-character tags!! Why not <e>...</e> and <s>...</s>?! If you really think we needed to preserve the one-character tags, that we were given a two-character abbreviation for <em> but are forced to use a five-character word for <strong> is just insulting :(.
<s>...</s> already exists and is the "text-decoration: line-through"
tag.
Incidentally, there's also "strike" and "del", which look the same in
my UA style sheet. I think strike was "deprecated" at some point,
but I probably added it because websites still use it.
I spent a while trying to do all the semantic markup properly on my blog -- <em>, <i>, <dfn>, <cite>, <mark>, <strong>, <b>, etc. I eventually gave up and just used <i> and <b> everywhere. It was such a waste of energy reading MDN docs and trying to decide between tags when they render identically and 99.9% of users aren't going to view the source. I also encountered bugs like <cite> breaking Safari Reader View.
Oh, one quick note about your markdown from someone stupid enough to have tried to write his own markdown flavor: those slashes are a nightmare for handling urls/paths. Trying to programmatically distinguish between "my/path to/some/ridiculous folder/and/s/y/m/bol/s" and "/i want this italic/ but not this. and sometimes o/nl/y some letters in a word." was all too much for me. I quickly retreated from using slashes at all in the markdown design. But there are definitely better programmers than me with much better designs for text parsing, so don't let me imply it's impossible (or even that hard! I honestly don't know!). I was just reminded of the anecdote and thought I'd share.
That used to be the advice, but the W3C eventually agreed with you. The spec describes <b> as "a span of text to which attention is being drawn" (https://html.spec.whatwg.org/multipage/text-level-semantics....) and no longer mentions boldface as what the tag "means", it's just how it's usually styled by default & convention.
Huh... the documentation there for i is actually even more interesting to me: it seems like I'm actually actively "not supposed to be" (at least anymore, if ever) using em for almost every reason I've ever used it?!
Typing a couple keys on a keyboard is a pretty weak complaint considering the unintended consequence of what you are advocating for results in discriminatory output against persons with access disabilities. This is the literal definition of narcissism, even if unintentional.
But... I am, surely, not advocating for people using <b> now: I'm merely lamenting that we allocated a one-character tag for <b> and then resorted to a five-character tag for <strong>, as it affects the readability (I couldn't care less about how many characters it is to type) of the un-rendered/hand-written document.
(Hell: it isn't even clear that I'm "advocating" for anything at all; at best it would be "don't bother with HTML/Markdown, as both ended up making poor choices for readability of your source document: instead, use a custom markup/markdown and then have code--on your server--to render it into the appropriate semantic HTML". Yet, while that is how my blog used to work, I actually failed to reallocate the tag names.)
I do, in fact, carefully use <strong> in my HTML documents (though I'm now starting to wonder if that's wrong, per the sister comment which linked us to the standard; it, surprisingly-to-me, does seem like I'm "supposed to be using" <i> in most, if not all, of the places I've been using <em>...), and I've been known to go to pretty extreme lengths to correctly support various accessibility technologies in my code, both on the web and native.
It simply makes me a bit angry, every time I see it, that someone decided to make such a common element <strong> instead of, say, <s>, which I believe is a reasonable position and has nothing to do with accessibility, as we could have named the new tag <powerful> and it would have worked the same and yet clearly that would have been even worse than <strong> ;P. We should get to separately judge--and even potentially lament one of--these two decisions.
(I'm thereby going to assert pretty directly that your decision to insult me by calling a narcissist is based on you not bothering to read what I wrote or pay attention to the actual thing I was complaining about--as I'd in fact have no reason to complain if I didn't care about the same thing you do: no one removed <b> from either the standard or the implementation--and just ran with a knee-jerk interpretation of some of the keywords I used.)
Note that times have changed, and what <b> used to be for back in the <font> and <center> days is not what it's still for. It's just a letter now, not short for "bold", with the following official definition:
> The b element represents a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood, such as key words in a document abstract, product names in a review, actionable words in interactive text-driven software, or an article lede.
Same for <i>: that's not short for "italic" anymore, it's just a letter now, and is defined as:
> The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts.
So go nuts: don't use <strong> or <em> if you semantically just needed <b> or <i>.
I managed to get 50 unassisted. Now looking at these comments I'm amused at some obvious ones that I missed. I've been writing html since ~1995 (I think) and I was surprised that <frame> didn't work. It was all the rage back in the day.
I got to 63, I think mainly because I've been working on an HTML5 pretty-printer in Racket recently [1] (basically my own implementation of the formatting aspects of HTML Tidy).
In hindsight I missed a few obvious ones (completely forgot lists), but would have expected HTML 4 tags to still be HTML tags (font, etc.). And I do wonder why SVG is on that list, which can be used inside HTML, but is pretty much not an HTML element, to my knowledge (same with math).
It's a valid HTML tag indicating that its contents are not HTML but instead SVG. The contents of a <script> tag are also not HTML, but we still consider <script> to be an HTML tag.
It's not just the contents; it's the tag itself. The only thing that is special to my knowledge is that the HTML 5 parser understands it and applies the correct XML namespace.
...
Ah, but thinking about it while I type these lines tells me where I'm wrong: It is an HTML element that's by default rendered as a block element, takes part in all the typical layout stuff. I can apply border, border-radius, background, etc. to it and it behaves like a div. Just that I can also put graphics inside.
162 comments
[ 3.1 ms ] story [ 246 ms ] threadBut it doesn't recognize marquee as a valid tag
[1]: https://www.w3.org/TR/2011/WD-html5-20110405/obsolete.html#t...
[2]: https://html.spec.whatwg.org/multipage/rendering.html#the-ma...
What helped is remembering an entire "block" of tags
e.g. H1 would also mean H2-H6
(I'll be the first to admit I really struggled to get to 41 and I too have been writing HTML by hand since 90s)
Mildly curious on what all I'm not using.
For what it's worth, I started writing HTML when dates began with the prefix 19... though most of my career has been on the server side.
> what's particularly interesting is that the element cannot be closed
> the element cannot be closed
> cannot be closed
THE END IS NIGH! REPENT!
And if you deal with Japanese website development, <ruby> and associated tags will came across, though less often.
Its sole purpose is to attach a caption to an image in <figure> - which basically no one uses.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/po...
- Probably <ruby> and related tags are used in Japanese and other spheres with such a language feature
- <base> I knew of, I thought archive.org used it but apparently not currently. Probably if you work with archived or otherwise namespaced content, you can reasonably find this a very familiar element
- <track> if you're a media person, doesn't seem that outlandish
- <dfn> I knew of basically, but just couldn't recall the names for glossary tags
- <kbd> is used all the time on Superuser (in Markdown, where HTML is valid though of course they filter most of it)
- Some others that I didn't remember, like <template> and <article>, were just stupidity. I know these...
This leaves <del> and <ins>. There are enough diffing tools, but it's not as big a category of software people constantly work on, especially since this is only for browsers. I'd not be surprised if these are the most-forgotten elements
Or does anyone still use <map>? I saw it in the HTML tutorial (linked from a Dutch magazine) that got me into programming so I know of it and remembered while doing the quiz, but it's fairly far faded from my mind and I'm not sure anyone would ever use it when, if you want this sort of functionality, you'd probably want the versatility of JavaScript
The teacher had us build a page with like 10 tags or something. I thought I was clever and quickly wrote out:
h1 h2 h3 h4 h5 h6 h7 h8 h9 h10
Needless to say he told me to figure out why I needed to redo it.
https://web.archive.org/web/20060203035414/http://code.googl...
The mantle has now been passed to the HTTP Archive, whose Web Almanac includes a section on the popularity of HTML elements:
https://almanac.httparchive.org/en/2022/markup#elements
BTW: I got 97, which is 96 more than the number of friends I have :)
Looked up your name plus the word 'w3'. I am not surprised to find involvement in an HTML spec discussion :D The top result on duckduckgo was <https://github.com/validator/validator/issues/1433#issuecomm...>.
But it shouldn't be to hard finding each of these individually.
Here are some links I could find:
https://www.advancedwebranking.com/seo/html-study
https://w3techs.com/technologies/overview/javascript_library
Click the stats on the left
HTTP Archive has similar data, but from the web crawler, so page views don't matter.
I could write a page with a dozen marquees in it, but those marquees will be far less used than a single one on Google's homepage.
Doing this reminded me how angry I am that I am supposed to use "<strong>...</strong>" instead of "<b>...</b>". The verbosity overhead in a normal document of markup littered with five-character tags for something as basic as a keyword is sufficiently worse than one-character tags that it drives me to want to use something like Markdown (but then I am angered that it went with *...* and **...** instead of /.../ and *...* and I just start to give up on other peoples' tooling entirely).
"strong" is an intention and allows other things to define what style(s) that intention should be represented with.
It's not often that you want to represent something as a "bold" style without representing it as having strong emphasis, but there are times. A header is a good example of a place where you might want the header to be styled bold, but strongly emphasize a single word in the header. Since <header> doesn't apply the styles that - say - h1 does, it would be perfectly reasonable to script your header as
``` <header><b>The <strong>Worst</strong> Case Scenario</b></header> ```
... especially if you didn't want all of your headers to have a bold style applied.
Obviously there are a few other edge cases but I will admit that the vast majority of the times would naturally call for a strong tag, over a bold tag. And for those majority cases, I'm really glad that it's "strong" rather than bold, because "strong" is meaningful in different ways than "bold" and it always makes more sense, to me, reading it back as html telling me how I should interpret the word, rather than just how it should look.
Instead, I am complaining that we got to allocate a one-character tag to bold and then when we realized that we screwed that up we allocated a FIVE-character tag to strong. Hell: we hadn't even run out of one-character tags!! Why not <e>...</e> and <s>...</s>?! If you really think we needed to preserve the one-character tags, that we were given a two-character abbreviation for <em> but are forced to use a five-character word for <strong> is just insulting :(.
Incidentally, there's also "strike" and "del", which look the same in my UA style sheet. I think strike was "deprecated" at some point, but I probably added it because websites still use it.
Did you use ChatGPT to count the letters?
https://en.wikipedia.org/wiki/Narcissism
(Hell: it isn't even clear that I'm "advocating" for anything at all; at best it would be "don't bother with HTML/Markdown, as both ended up making poor choices for readability of your source document: instead, use a custom markup/markdown and then have code--on your server--to render it into the appropriate semantic HTML". Yet, while that is how my blog used to work, I actually failed to reallocate the tag names.)
I do, in fact, carefully use <strong> in my HTML documents (though I'm now starting to wonder if that's wrong, per the sister comment which linked us to the standard; it, surprisingly-to-me, does seem like I'm "supposed to be using" <i> in most, if not all, of the places I've been using <em>...), and I've been known to go to pretty extreme lengths to correctly support various accessibility technologies in my code, both on the web and native.
It simply makes me a bit angry, every time I see it, that someone decided to make such a common element <strong> instead of, say, <s>, which I believe is a reasonable position and has nothing to do with accessibility, as we could have named the new tag <powerful> and it would have worked the same and yet clearly that would have been even worse than <strong> ;P. We should get to separately judge--and even potentially lament one of--these two decisions.
(I'm thereby going to assert pretty directly that your decision to insult me by calling a narcissist is based on you not bothering to read what I wrote or pay attention to the actual thing I was complaining about--as I'd in fact have no reason to complain if I didn't care about the same thing you do: no one removed <b> from either the standard or the implementation--and just ran with a knee-jerk interpretation of some of the keywords I used.)
> The b element represents a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood, such as key words in a document abstract, product names in a review, actionable words in interactive text-driven software, or an article lede.
Same for <i>: that's not short for "italic" anymore, it's just a letter now, and is defined as:
> The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts.
So go nuts: don't use <strong> or <em> if you semantically just needed <b> or <i>.
I got to 80, and I'm stumped on the last 34.
[1]: https://joeldueck.com/what-about/html-printer/
...
Ah, but thinking about it while I type these lines tells me where I'm wrong: It is an HTML element that's by default rendered as a block element, takes part in all the typical layout stuff. I can apply border, border-radius, background, etc. to it and it behaves like a div. Just that I can also put graphics inside.