How do I make text bold in HTML?

后端 未结 10 1236
时光说笑
时光说笑 2020-12-23 08:44

I\'m trying to make some text bold using HTML, but I\'m struggling to get it to work.

Here\'s what I\'m trying:

Some text th         


        
相关标签:
10条回答
  • 2020-12-23 09:25

    use <strong> or <b> tag

    also, you can try with css <span style="font-weight:bold">text</span>

    0 讨论(0)
  • 2020-12-23 09:26

    HTML doesn't have a <bold> tag, instead you would have to use <b>. Note however, that using <b> is discouraged in favor of CSS for a while now. You would be better off using CSS to achieve that.

    The <strong> tag is a semantic element for strong emphasis which defaults to bold.

    0 讨论(0)
  • 2020-12-23 09:26

    You're nearly there!

    For a bold text, you should have this: <b> bold text</b> or <strong>bold text</strong> They have the same result.

    Working example - JSfiddle

    0 讨论(0)
  • 2020-12-23 09:27

    It’s just <b> instead of <bold>:

    Some <b>text</b> that I want bolded.
    

    Note that <b> just changes the appearance of the text. If you want to render it bold because you want to express a strong emphasis, you should better use the <strong> element.

    0 讨论(0)
提交回复
热议问题