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 CSS Basics (2014) Understanding Values and Units Text Styles

Leo Penaloza
Leo Penaloza
8,426 Points

What's the difference between using <strong> and using CSS of font-weight:bold ?

What's the difference between using <strong> and using CSS of font-weight:bold ?

Dave StSomeWhere
Dave StSomeWhere
19,870 Points

The key difference that I'm aware if how screen readers (for blind people) handle the difference for accessibility purposes.

Check out the answer on this Stack Overflow Question for some additional discussion.

3 Answers

I do not believe there is a real difference in style other than the methods being HTML vs CSS. Using the HTML <strong> shows that the word or phrase has added importance, while the CSS font-weight:bold; is purely just style.

To expand on this. Search engine bots and other relevant software can know that the word/phrase is important if <strong> is used.

grant Mitchell
grant Mitchell
6,919 Points

The difference is how accessible it is for your page. If your using lot's of styling then you would rather just use css, however a simple small change you should use html for a small adjustment.

M Khan
M Khan
7,024 Points

There is no difference, but i prefer to keep my html file much more cleaner and assign the styling job to CSS instead