4 ms·
I love the use of the <font> and <b> tags, too.
by rsobers 14y ago
I love the use of the <font> and <b> tags, too.
- stan_rogers 14y ago<b> is valid in HTML, and different from <strong>. It's actually being used correctly here.
- saraid216 14y agoIt's valid, but it's one of those things that shows they're not a web developer. We don't use <font> or <b> anymore. That's what CSS is for.
- zopticity 14y agoNope, you're wrong. <b> is actually still being used to differentiate between <strong>. <strong> is used for accessibility reasons (making the words enunciate with emphasis, while <b> just makes the words bold by default). If you want to bold a part of the sentence without having emphasis, you'll need to use <b>.
- Evbn 14y agoWhat's the difference between <strong> and <em>. Em is for emphasis.
- stan_rogers 14y ago<em> is for intonational emphasis, the way you'd give a little extra stress on a word when you are speaking. <strong> is an indicator of importance, and may not correspond to intonational emphasis in spoken language. As for the older tags, they were deprecated in XHTML, but have been redeemed in HTML 5. <i> is used for elements that are traditionally set it italics but are neither emphasized nor citations. Often that will be foreign words (where one ought to use a lang attribute). Similarly <b> is used to indicate elements that are traditionally set in bold face, but which do not indicate importance (as headings or <strong> in running text would do). Both are better than the semantically-meaningless <span> tag, and vastly better than misusing the <em>, <cite> and <strong> tags for their presentation effects.
- saraid216 14y agoI'd use <span style="font-weight: bold" /> for making something bold. Because that's a styling thing, so I use a style sheet. I could even use <strong style="font-weight: normal" /> if I wanted to emphasize something without making it bold. Because that has a functional purpose with screen readers, and isn't strictly a styling thing.
- nostrademons 14y agoFWIW, Google Search still uses <b> tags for byte-saving reasons. Search terms are all bolded, and the page would become significantly heavier if those were <strong> or <span class=...> tags instead of <b>. (There's some crazyness where they actually become <em> tags in China and are styled differently, because Chinese typographical conventions avoid bolding characters and instead turn them red for emphasis. I tried to simplify this once and do everything via CSS, but it turns out to be quite complicated because you also have to handle the case of interface text that's not in Chinese and supposed to be bolded, and exceptions for single-character words, and mixed English/Chinese text, and other languages like Arabic that run RTL, and mixed Arabic/English text, and presumably mixed Arabic/Chinese text though I've never seen such a page. It turns out CSS is fairly limited when you get into the complexities of human typographical conventions across the globe.)
- stan_rogers 14y agoAs I noted below, <b> and <i> are meant to be typographically-significant elements, so it's not just byte-saving. Google is using <b> and <i> correctly in that case (even if that's just a happy accident).