DEV Community

Cover image for How To Bold Text The Easy Way With HTML Tag / Markdown
Howbeginners
Howbeginners

Posted on • Updated on

How To Bold Text The Easy Way With HTML Tag / Markdown

If you are new to HTML and want to bold text, this is the guide for you. In this article, I will teach you how to bold text with an HTML tag and in markdown with my guide. This method is easy to follow and can be used by anyone who begins learning HTML at the first place.

Bold text with strong html tag

There are a couple of ways to bold text in HTML. The easiest way is to use the tag. Here's how it works:

  1. Create a new paragraph and type .
  2. Inside the tag, insert your desired bold text.
  3. Save your document and you're done!

Here is an example of code with <strong> bold text </strong> tag:

<strong>This is a Bold Text</strong>
Enter fullscreen mode Exit fullscreen mode

Bold text with b html tag

Bold text can be easily achieved with a simple html tag. The b tag tells the browser to bold the text that follows it. Here are a few examples:
<b>Hello World! </b>
<b>This is bold text. </b>

<b>This is a new bold text.</b> 
Enter fullscreen mode Exit fullscreen mode

Bold Text in markdown

Using bold text in markdown can make your writing stand out and be more easily read. Below are three guidelines for using bold text in markdown:

  • Use bold for important words or phrases that you want to make particularly noticeable.
  • Use bold when you want to introduce a new concept or to emphasize a point.
  • Use bold sparingly, as it can be disruptive and hard to read.

When you want to bold text in a markdown document, you can use the ** character both side of the text. This will make the text bold.

Here is an example:

**This a a bold text**
Enter fullscreen mode Exit fullscreen mode

Bold Text With CSS

If you want to give your text a bold appearance, you can use the font-weight:bold css property. This will make the text heavier and more noticeable. There are a few ways to do this, but we'll focus on one specific method: inline code.

To bold text in an inline code block, simply add the font-weight:bold css property to the appropriate element. For example, if you want to bold all of the text within a <p> tag, you would use the following code:

<p style="font-weight:bold">Bold Text</p>.

Here is the code:

<p style='font-weight: bold'>This is a Bold Text</p>
Enter fullscreen mode Exit fullscreen mode

That’s all what I want to share. Thanks for reading.

Follow my blog here: www.howbeginners.com

Top comments (0)