I\'m trying to make some text bold using HTML, but I\'m struggling to get it to work.
Here\'s what I\'m trying:
Some text th
use <strong>
or <b>
tag
also, you can try with css <span style="font-weight:bold">text</span>
HTML doesn't have a <bold>
tag, instead you would have to use <b>. Note however, that using <b>
is discouraged in favor of CSS for a while now. You would be better off using CSS to achieve that.
The <strong> tag is a semantic element for strong emphasis which defaults to bold.
You're nearly there!
For a bold text, you should have this: <b> bold text</b>
or <strong>bold text</strong>
They have the same result.
Working example - JSfiddle
It’s just <b> instead of <bold>
:
Some <b>text</b> that I want bolded.
Note that <b>
just changes the appearance of the text. If you want to render it bold because you want to express a strong emphasis, you should better use the <strong> element.