Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

What is the piece of code to bold a piece of text? (HTML)

croakley
croakley

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

3 years ago

Voters

Comments

TopNew
5
Geocube101
Geocube101

You can use the font-weight property to bold text

<element style="font-weight: bold;">innerHTML</element>

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

element { font-weight: bold; }

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

3 years ago
2
Vandesm14
Vandesm14

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

<b>this is bold</b> <br> this is not bold
3 years ago
1

@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>.

3 years ago
Load more