CSS – Bold Text

To make text bold using CSS, set font-weight property, for this HTML Element, with the value bold. To make the text bolder, we may use the value bolder.

</>
Copy
font-weight: bold;

In the following example, we take two paragraph elements. The first is having a default font-weight, while the second is having a font-weight of bold.

index.html

</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <style>
        #p2 {
            font-weight: bold;
        }
    </style>
</head>
<body>
    <p id="p1">First paragraph.</p>
    <p id="p2">Second paragraph.</p>
</body>
</html>

Conclusion

In this CSS Tutorial, we learned how to make the text bold in HTML Element(s) using CSS.