Ask coding questions

← Back to all posts
What is the piece of code to bold a piece of text? (HTML)
croakley

I'm working on a project but I cannot bold a piece of text. Can I have some help?

Answered by Geocube101 [earned 5 cycles]
View Answer
Voters
croakley
Comments
hotnewtop
Geocube101

You can use the font-weight property to bold text

...or if you're using the "style.css" page or <style> tag...

In both cases, replace "element" with the actual element you're using

Vandesm14

Use the <b> tag to bold sections of text:

[deleted]

@Vandesm14 Or the strong tag. I think it is the preferred tag to use these days as it is more semantic: <strong>I am bold and strong!</strong>.