Skip to main content
HTML Validation

CSS: “font-style”: “bold” is not a “font-style” value.

About This HTML Issue

The CSS font-style property is used to set the style of the font, such as normal, italic, or oblique. The value bold is not a valid value for font-style. Instead, you should use the font-weight property to set the boldness of the font. The valid values for font-weight are normal, bold, bolder, and lighter.

Here’s an example of how to use the font-weight property to set the text to bold:

<p style="font-weight: bold;">This text is bold.</p>

Alternatively, you can use a CSS stylesheet to apply the font-weight property to multiple elements:

<style>
  p { font-weight: bold; }
  h1 { font-weight: bolder; }
</style>

<p>This text is bold.</p>
<h1>This heading is even bolder.</h1>

Last reviewed: May 30, 2023

Was this guide helpful?

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Ready to validate your sites?
Start your free trial today.