Skip to content

Comment on Beginners Guide to HTML/CSS

Comments

No one uses the strong tag.

False. At the very least, Reddit uses the strong tag, and so I don't feel like scouring the web for more bold text. I did do one search, and it turns out other people recommend strong over b in most situations, like this person: http://stackoverflow.com/questions/649305/alternative-to-the...

I read the arguments regarding the strong and b tags, and I tried to see a difference between the two but failed to do so.

From the above link

>If you want to stress importance of text, use strong. If you don't want to stress importance, use the b tag or use the font-weight:bold; style on the element or in the CSS.

Am I missing something? I've been writing html for long enough time not to consider myself beginner but it still doesnt make sense to me.

HTML describes a document semantically and using tags like <b> and <strong> is bad practice. Styling, like what results from using <b> and <strong>, should be done via css.

Well, if that's what you meant, you should have said that, instead of making false claims about what people do and don't do.

Now that we're back on track, If you're trying to make a semantic point in an article by emphasizing certain things, wouldn't you want that reflected in the HTML? Do screen readers do something special for bold-via-css or is the emphasis lost on the visually impaired?

I use <strong> over <b> if forced to use one, but I usually do a span with a font-weight instead.

NY Times uses strong.

No one uses WBR.

Off the top of my head, Facebook uses <wbr> to format link text. Eg

  <a href="http://28.media.tumblr.com/tumblr_lupq8leShl1qgxeuqo1_500.gif">
  <span>http://28.media.tumblr.com/</span>
  <wbr />
  <span class="word_break"></span>
  <span>tumblr_lupq8leShl1qgxeuqo1_500.</span>
  <wbr />
  <span class="word_break"></span>
  gif
  </a>
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.