Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Framework Basics Prototyping with Bootstrap Adding a Dropdown Menu and Glyphicons

Miguel Agawin
Miguel Agawin
3,211 Points

<b> tag for glyphs

How come the <b> tag is used for glyph icon fonts? Is this conventional? (Using <p> doesn't change thickness.) And how come it can't be selected on the front end with the cursor? Thanks!

1 Answer

James Barnett
James Barnett
39,199 Points

tl;dr - Bootstrap did that for a while until they changed their minds in bootstrap 3.


<b> and <i> are no longer used for bold and italics with that change some people mistakenly thought that <b> and <i> were deprecated. Others knew better but decided it was ok to play fast and loose with semantics anyway.

I've heard 2 common justifications for this practice:

  1. <i> and <b> are 3 characters shorter than <span>
  2. The <i> makes them think of the i in icon

Neither view is supported by the spec, but web browsers will render most anything regardless of the semantics. Similarly, you can use replace all of your <span>s with <div>s and it will render just fine, however it won't be valid markup.