|
|
What HTML tag should I use, <b> or <strong>?Just a quick question: as I'm figuring out HTML, I've learned that "<b></b>" will make the inner text bold, but why are we seeing "<strong>" being used these days? Is there a difference? While you would think that something so rudimentary as the markup language for Web pages wouldn't be a place where you'd find great controversy, in fact there are two different quite fervent camps in site design that are represented in this debate. What we're talking about is whether markup should be functional or whether it should be presentation-based. If you were on the functional side, you would say that when you're writing content for online publication, you want to simply note how that element relates to the content overall. So "<cite>" for citations, "<a>" for anchor text (hypertext links), and so on. How it's rendered, how the tool that the reader is using to view your content, is up to their tool's preferences. Some users might prefer citations in yellow with a dark blue background, while others might want to simply have it underlined: it's "up to the browser". In fact, when I teach web design classes, that's our mantra, because however much you tweak things, the user's tools, preferences and settings can and will doubtless change how they see your material. Now, on the presentation side, designers would point out that while all of this is well and good with something like a citation, there's such a difference between bold and italic in terms of how you read and process the information on the screen that it's of great importance that the content producer have greater control over how it's displayed. While functional designers would use "<strong>" and "<em>" for words that should be emphasized or "stronger", a presentation designer would eschew it completely and use "<b>" for bold and "<i>" for italics. Which is right? Well, it's hard to say. If you like having more control over the presentation of your material, then the presentation approach is going to be a better match. If you want to focus on your content and let the reader (or, more accurately, their reading tool) do the work, then a more functional approach may be for you. As it turns out, this is somewhat of a moot point given the rise of Cascading Style Sheets (or CSS). CSS brings a far greater level of sophistication to presentation markup and while it initially seems a lot more complicated, the greater power makes it well worth learning. In CSS, however, the markup "<b>bold!</b>" changes rather dramatically to "<span style='font-weight:bold;'>bold!</span>". A lot more complex, but as you might guess, there are dozens of different transformations you can apply to text with CSS elements -- like wrapping the text with a thin border -- that just aren't even an option with HTML. While I am a big fan of CSS and use it with astonishing frequency for even the most simple tasks, it's definitely more complicated and, more of a problem, many Web sites let you use rudimentary HTML where you can't use CSS. A great example is that most online forums and blogs allow "<b>" notation in your comments to let you emphasize words, but very few allow "<span>" to let you use the full power of CSS to really pretty up your prose. Therefore it does behoove you to learn at least the dozen basic HTML markup tags for just those situations. In fact, I have a brief article on my Web site that gives you just this list, with a helpful explanation of each tag: Essential HTML tags bloggers need to know. My recommendation for when you must use HTML? Use the presentation-based approach, not the functional approach. In a word, "Go <b> go!"
More Useful HTML, JavaScript and Web Site Programming Articles:
✔ How to Create Predefined Google Image Search Links?
Thanks for the Amazon URL [see Creating Amazon Search Links]. That worked beautifully. In fact, I sent you $5.00 for coffee in thanks....
✔ Can I embed a Facebook search box on my blog site?I've seen your articles about how to add a Twitter or Google search box on a Web page, but I have a tougher...
✔ Can I use CSS for drop shadows on my blog?I want to give my site a bit of a facelift and add some neat graphical elements. One of which is drop shadows....
✔ How can I embed interactive photo panoramas on my site/blog?I read through your blog entry about how to take panoramic photos with iOS 6 and an iPhone 5 and got enthused. I've...
✔ How can I create a Twitter search URL shortcut?I'd like to add a few Twitter search links to my Web site. Is that possible, or does Twitter prohibit this sort of...
Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help
right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
Categorized:
HTML, JavaScript and Web Site Programming
(Article 8447,
Written by Dave Taylor)
Tagged: css, html, markup, web design Previous: Review: BlackBerry Curve 8310 Next: What is eBay auction fever? Reader Comments To Date: 8Matt said, on October 14, 2008 10:17 AM:
Dave, do you know if search engine logic gives higher weight to terms within EM tags than I or B tags? Chetan Crasta said, on October 30, 2008 3:58 AM:
That was an informative article - it provides both sides of the debate nicely. JOSEPH said, on November 27, 2008 2:24 PM:
Hi Dave, I have a question for you! How can i override an anti HTML script? I have a webpage which i have used HTML on it for over 3 years without any problem whatsoever....since last month when we were all told by the website staff that they are doing some 'rutine maintainance' i find myself unable to edit or change my webpage anymore! :-( When i try to edit my webpage and save it a pop up window comes on my screen saying "Please do not use HTML tags!", when i click "OK" for this pop up window and click "Cancel" for changes instead of "Save" what HTML that is already in my profile/webpage stays intact/saved. I was told by the website that there must be something in my profile that is triggering there anti HTML script off and that's why i'm getting the pop up window saying "Please do not use HTML tags!" What can i do?? *confused* sunny said, on December 5, 2008 11:43 PM:
I too like CSS because I feel very irritated when I have to make changes to every page of site one by one if there is no style sheet. Armaan said, on September 14, 2010 10:26 AM:
I use strong as it looks cool. Ashfaq said, on December 11, 2010 9:03 AM:
I use strong instead of using tags Pete said, on June 28, 2011 8:33 AM:
There's an actual, functional difference between STRONG and B, EM and I. STRONG and EM are logical tags -- screen readers will treat them differently than B and I, which only visually change the formatting. If you're creating headings or links with bold or italic, you probably want B and I. However, if it's a few words that you really want to emphasize, as you would if speaking aloud, use STRONG and EM.
I do have a comment, now that you mention it!Check This Out Too... |
Recent Entries
Look for Answers
Recommended
All Our Categories
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and Blogging Building Web Site Traffic Business and Management Computer and Internet Basics d) None of the Above Facebook Help Google Gmail Help Google Plus Help HTML, JavaScript and Web Site Programming Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Kindle Fire Help Mac OS X Help Pay Per Click (PPC) Advertising Pinterest Help Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help Find Me on Google+ ADT on G+ |
I generally prefer using tag in my posts and even in the codes of static pages.