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 trialJohnny Garces
Courses Plus Student 8,551 Pointswhat is the b tag and is it deprecated in html?
TY!
4 Answers
Jeff Jacobson-Swartfager
15,419 PointsYou can find the definition of the b
tag on the W3C's website. The short of it:
You should always bear in mind that the content of a b element may not always be bold, and that of an i element may not always be italic. The actual style is dependent on the CSS style definitions. You should also bear in mind that bold and italic may not be the preferred style for content in certain languages.
You should not use b and i tags if there is a more descriptive and relevant tag available. If you do use them, it is usually better to add class attributes that describe the intended meaning of the markup, so that you can distinguish one use from another.
Also,
The b element represents a span of text to be stylistically offset from the normal prose without conveying any extra importance, such as key words in a document abstract, product names in a review, or other spans of text whose typical typographic presentation is boldened.
Henrik Hansen
23,176 PointsIt is for bold.
You can find a good tag reference at w3schools.com
Henrik Hansen
23,176 PointsNote: use CSS instead.
Fernando Claussen
9,324 PointsThe b tag is for bold text. Although it's not deprecated it should only be used as a last resort when no other tag fits. See what w3schools.com has to say
Tips and Notes
Note: According to the HTML 5 specification, the <b> tag should be used as a LAST resort when no other tag is more appropriate. The HTML 5 specification states that headings should be denoted with the <h1> to <h6> tags, emphasized text should be denoted with the <em> tag, important text should be denoted with the <strong> tag, and marked/highlighted text should use the <mark> tag.
Tip: You can also use the CSS "font-weight" property to set bold text.
Johnny Garces
Courses Plus Student 8,551 Pointsthanks for the answer- just realized there's the span tag to use as well!