This page provides "HTML bold" code. By "HTML bold", I mean code that makes changes the text weight to bold.
There is more than one way to create bold text in HTML. Below are the various methods of creating bold text.
<strong> tag is used to give text a stronger importance. Only use this tag when the enclosed text is actually more important than its surrounding text.
<b> tag is to markup text as bold without conveying any extra importance. For example, this could be useful in article abstracts, where the beginning of an article is set in bold text.
Using Cascading Style Sheets (CSS)
You can use CSS instead of, or in conjunction with, the above HTML tags. To make text bold with CSS, use the
font-weight property. Here's an example:
Note that, although this property allows you to specify various levels of boldness, most browsers can only render two levels (bold and normal). Therefore, if you only see two different levels of bold above, this would be why. The most common values are
normal (which overrides any bold setting).