Gen-T
04-06-2004, 06:12 PM
<strong> or <bold>
What do you use?
Does it matter? Is there a difference?
Do any browsers care?
What do you use?
Does it matter? Is there a difference?
Do any browsers care?
![]() | View Full Version : <strong> or <bold> - does it matter? what's the difference? Gen-T 04-06-2004, 06:12 PM <strong> or <bold> What do you use? Does it matter? Is there a difference? Do any browsers care? Lesli 04-06-2004, 07:11 PM I don't know that browsers currently care. I tend to use strong rather than bold, but currently, it's largely (not completely, but largely) a matter of preference of approach. Semantic markup versus presentational. I don't know how other devices would render them (for example, screen readers or Braille browsers), but I'd be interested to find out the differences. Fisher R 04-06-2004, 07:34 PM For accessibility you should use the <strong> tag because this is what speech browsers and such look for. The <b> tag is now deprecated so it would be best to get used to using the <strong> tag, though both will work for the time being. serialbeggar 04-06-2004, 07:39 PM See: http://www.w3.org/TR/html4/struct/text.html The presentation of phrase elements depends on the user agent. Generally, visual user agents present EM text in italics and STRONG text in bold font. Speech synthesizer user agents may change the synthesis parameters, such as volume, pitch and rate accordingly. Rich2k 04-07-2004, 01:53 PM Actually <b> has not been deprecated. It is still listed in the XHTML1.1 DTD and that is a strict DTD which doesn't contains any deprecated elements or tags. CyberAlien 04-07-2004, 04:47 PM i usually use css instead of it, but when it comes to tags i use <b> but it is outdated so i think i should switch to <strong> someday... Rich2k 04-07-2004, 05:47 PM Both elements are in the HTML 2.0 DTD so neither is more outdated than the other, and neither is deprecated. CyberAlien 04-07-2004, 06:21 PM xhtml 2.0 doesn't mention <b> at all. only <strong>. so it is deprecated. http://www.w3.org/TR/2003/WD-xhtml2-20030506/mod-inline-text.html#s_inline-textmodule_issue_3 edit: nether does xhtml 1.0 basic: http://www.w3.org/TR/2000/REC-xhtml-basic-20001219/ stripeyteapot 04-07-2004, 06:31 PM <b> works, shorter, and time efficient if you have a lot of code to type **curses HTML editors** Nothing like good old notepad ey? :) CyberAlien 04-07-2004, 06:44 PM Originally posted by 4 Degrees **curses HTML editors** amen to that :) everyone should write code manually with notepad-compatible editors or not write html at all. Rich2k 04-07-2004, 06:51 PM Originally posted by CyberAlien xhtml 2.0 doesn't mention <b> at all. only <strong>. so it is deprecated. http://www.w3.org/TR/2003/WD-xhtml2-20030506/mod-inline-text.html#s_inline-textmodule_issue_3 edit: nether does xhtml 1.0 basic: http://www.w3.org/TR/2000/REC-xhtml-basic-20001219/ XHTML is still a working draft so don't rely on ANYTHING contained within it and no user-agents are yet designed to use it. XHTML 1.1 defined <b> and so does XHTML 1.0 strict From the XHTML 1.0 strict DTD <!--=================== Text Elements ====================================--> <!ENTITY % special.pre "br | span | bdo | map"> <!ENTITY % special "%special.pre; | object | img "> <!ENTITY % fontstyle "tt | i | b | big | small "> <!ENTITY % phrase "em | strong | dfn | code | q | samp | kbd | var | cite | abbr | acronym | sub | sup "> There is no DTD for XHTML 2.0 yet http://www.w3.org/TR/xhtml2/xhtml20_dtd.html#a_xhtml20_dtd_issue_0 You can see that XHTML 2.0 is still far from complete when you read the entry for the <strong> tag strong Leave in, deprecate or remove? No consensus. telnettro 04-07-2004, 07:03 PM i tend to use strong because of the non visual browsers. usually I don't like exactly what it does, tho so i'll put a class= or style= in there and override whatever visual effect it has anyway. If it's my personal stuff all my text formatting is done with span. then again b is short and makes more sense to me (remember i... i and b...) And amen to the notepad remark. Except you all should use textpad. Most html these days is snippets inside scripts, isn't it? Zopester 04-08-2004, 03:47 AM It's been a long time since I've used either <b> or <i>. They're semantically meaningless, presentational rubbish which doesn't belong in XHTML, deprecated or not. Both <strong> and <em> can be styled with CSS if you don't like the default looks (personally I always make certain in my CSS that <strong> is font-weight:bold, and <em> is font-style:italic - yes the default, but always best to make certain every single browser is seeing what you mean them to see) and they actually hold some structural value. It's the same argument (IMO) as the one about whether it's better to write <p><font size="+2"><b>My Title</b></font></p> or just simply <h1>My Title</h1>. No brainer right? One holds semantic meaning, the other certainly doesn't. <b> and <strong> fall neatly into those camps too. Mekhu 04-08-2004, 04:09 AM Originally posted by CyberAlien amen to that :) everyone should write code manually with notepad-compatible editors or not write html at all. Why is that? CyberAlien 04-08-2004, 05:22 AM Originally posted by Mekhu Why is that? Because html editors create complete mess (except for dreamweaver that seems to be the only decent editor) instead of html code. And sometimes that mess is so big that page can be viewed only with IE (mostly created with frontpage). |