<b> tag for font-weight: bold; not apply on element


I have use b tag inside a link like:

<a href="https://google.com"><b>Google</b></a>
Is more elegant way than just apply on a tag CSS the font weight: bold; and this is correct way to use? I mean what about <b><a href="">test</a></b> is break something?


Both will produce same result(as per your example) but reading this will clarify the right usage of <b> tag

1 Like

You know for new html5 elements have include new tags and try to use them and when no need apply directly the font-weight it will be fine with b tag is something like div class test123 versus section class 123…

ofc you can use font-weight but a screen reader will not know that key words are emphasized some way.

In the latest readers you mean? Because need to know as is new elements in html like section or footer. The logical is that use custom elements as many you can be unique some way not like div class footer vs footer.


<strong></strong> is the more correct way if you’re worried about accessibility. you can use it in the A tag or our both should work

1 Like