News for hackers. Stuff that matters.
Re:HTML Tags Memory Test by catapart on Monday July 15, 2024 @01:33PM (#40969827)
"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.

Re:HTML Tags Memory Test by mk12 on Monday July 15, 2024 @01:56PM (#40970012)
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.
Re:HTML Tags Memory Test by saurik on Monday July 15, 2024 @01:47PM (#40969955)
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 :(.

Re:HTML Tags Memory Test by shiomiru on Monday July 15, 2024 @02:35PM (#40970301)
<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.

Re:HTML Tags Memory Test by xigoi on Tuesday July 16, 2024 @04:23AM (#40974560)
> we allocated a FIVE-character tag to strong.

Did you use ChatGPT to count the letters?