3 of 313 menu

The font-weight property

The font-weight property sets or disables bold text.

Syntax

selector { font-weight: bold | normal; }

Values

Value Description
bold Makes a text bold.
normal Cancels bold. Usually necessary if you need to make a tag that is bold by default (for example, headings h1-h6 or th).

Default value: different for each element - paragraphs are not bold by default, but headings are bold.

Example

Let's set a bold font for the paragraph:

<p> Lorem ipsum dolor sit amet. </p> p { font-weight: bold; }

:

Example

Let's cancel a bold font for the title (it's bold by default):

<h2>Lorem ipsum</h2> h2 { font-weight: normal; }

:

byenru