/    Sign up×
Community /Pin to ProfileBookmark

To <b> or not to <b>

I’ve been working on some documents, and was asked by my boss to put the formatting in the CSS. There are some specific spans that they want used.

I was wondering if it makes any sense (and if there is any advantage) to include spans for bold and italic text rather that just using the good ol’ <strong> or <b> tags in the html. Any suggestions?

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@Mr_Initial_ManAug 30.2007 — One I can think of right off: a special span for foreign languages, which are italicized, or if you're italicizing something for visual effect rather than emphasis. Otherwise, if you're emphasizing something, use <em>
Copy linkTweet thisAlerts:
@KravvitzAug 30.2007 — It depends on each situation. You should use an <em> if you want to emphasize some text and <strong> if you want to give strong emphasis to some text.

Check out [url=http://www.sitepoint.com/forums/showthread.php?t=294327]<em> <strong> or <i> <b>[/url].
Copy linkTweet thisAlerts:
@rooshk34authorAug 30.2007 — So what I understand is that it's best to put the straight text formatting into the css. However, if I want to emphasize a word (not just format the text) in some way I should use a <strong> or <em> tag in the html. Did I understand correctly?
Copy linkTweet thisAlerts:
@Mr_Initial_ManAug 30.2007 — Exactly. That's [i]semantics[/i], i.e. the element should perform the function its name describes. <span> and <div> don't mean anything, so they can be used for anything.

CSS does formatting by working through HTML.
Copy linkTweet thisAlerts:
@WebJoelAug 30.2007 — "<b>", "<i>" and (example) "<font size=3>" are just a few of the non-semantic tags that I never use anymore. Whenever I update a client's page(s), I aggressively remove these deprecated tags in favor of semantic markup.
×

Success!

Help @rooshk34 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...