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 trialNaivedya Bansal
5,483 Points<strong> and <b> What is the difference?
what is the difference between <strong> tags and <b> tagS ?
3 Answers
Rich Bagley
25,869 PointsHi,
b
is used for styling a word / sentence bold whereas strong
is used semantically to indicate importance.
This is a great way of explaining it over on Stack Overflow.
EDIT: The info over on w3schools may also help :)
Hope that helps.
-Rich
Stan Goldmann
2,035 PointsIn HTML5 'strong' and 'b' both exist and have a different meaning.
The 'b' tag is for "offset text conventionally styled in bold without conveying any extra emphasis or importance".
'strong' is different. It "represents a span of text with strong importance." There is semantic meaning of importance here. In fact, a 'strong' tag within another strong tag has even more importance. There is nested importance.
Source : http://engineeredweb.com/blog/2013/html5-semantic-diff-bold-strong/
Brian Romine
9,518 PointsAdditionally, it's less than ideal practice to use either. The "best practice" way to style those elements is to use CSS to set their properties rather than using the HTML. That keeps all of your styling in one place, which is better for future maintenance.
Noah Schill
10,020 PointsIs there a way to select a specific word in CSS using selectors?