how to bold words within a paragraph in HTML/CSS?

user1111042 picture user1111042 · Jan 30, 2012 · Viewed 128.4k times · Source

I am a beginner in web programming and have some very simple questions.

I'm trying to bold several words in one paragraph but I don't know how to do that using HTML/CSS. I've figured out how to bold entire paragraphs, but not individual words yet. How can I bold one word, like "bold" in my example?

This bolds an entire paragraph:

<html>
<head>
<style type="text/css">
p.n1
{
    font:15px bold 30px Georgia,serif;
}

</style>
</head>

<body>
<p class="n1">I am in bold. </p>
</body>
</html>

Answer

Mike Hofer picture Mike Hofer · Jan 30, 2012
<p><strong>This is in bold.</strong> This is not.</p>

You might find Mozilla Developer Network to be a very handy and reliable reference.