HTML

HTML – Bold, Italic and Underline Tags

Bold <b> Text Formatting Tag

The <b> tag is used to Bold, the text on web pages, forms, paragraphs, lines, and anywhere. The <b> tag is the inline tag… which doesn’t produce a line break on its use. Syntax:

<b> This is the bold tag </b>

Output:

 This is the bold tag 

As you can see this whole tax is Bold in the above format. You can use it with single words also like see the below examples. Sy
Syntax:

Hello Guys<b>Me Satya P. Joshi</b> How r u ? All you guys are fine. <b>am i right </b>

Output:

Hello Guys Me Satya P. Joshi How r u ? All you guys are fine. am i right 

You can use bold tags anywhere, everywhere, for example, for dictionary words. Syntax:

<p><b>A:</b>This is the first letter of the alphabet</p>

Output:

A:This is the first letter of the alphabet

I think this may help you to understand the B tag. You can use it anywhere for text formatting on HTML, but don’t forget to close the closing tag.

Italic <i> Text Formatting Tag. 

  • This tag displays the text in italics
  • The <i> tag is the pair tag; it has a start tag and a closing tag. 
  • The <i> tag is the text formatting tag. 
  • It will help you to change the text’s default style. 
  • The italic tag is the inline tag; it means it doesn’t produce any line breaks while using it.

This is what you can do with <i> </i> tag. Check the Normal Text and Using Italics on Figure. There you will find some differences in text style.

 
Italic

To add the Italics you need to add the following code:

Hello Guys My address is <i>Kathmandu, Nepal.</i> <i>Nepal is one of the beautiful country you should travel one time</i>. 

Output:

Hello Guys My address is Kathmandu, Nepal. Nepal is one of the beautiful country you should travel one time.

Underline <u> Tag

U is used to indicate that the enclosed text should be underlined. As most browsers use underlining to indicate hyperlinks, try to avoid this tag. It can confuse your users if they see “hyperlinks” that do not work.

  • <u> tag is used to underline the text. It makes it easy to understand for the user.
  • It is the inline tag. It doesn’t produce line breaks while using it.  
  • <u></u> tag is the pair tag. It has a start tag and an ends tag.
  • It will underline the text that comes in between <u> tag </u>.
 
UnderlineFig1

HTML Example

<p> The HTML is the <u>Hyper Text Markup Language</u>. It is client side scripting language.</p>

HTML Output:

The HTML is the Hyper Text Markup Language. It is client side scripting language.

Back to top button