HTML Text Formatting

Html text formatting is used to display special types of text. it contains several tags with special meaning. It is important while create web pages or website.

For example- Bold, Strong, Italic, and Small etc.

Formatting Elements in html

Following are different types of formatting elements, which I given below.

<strong>

It is used to Important text

<b> 

It is used to Bold Text

<i> 

It is used to Italic text

<em> 

It is used to Emphasized text

<mark> 

It is used to It is used to Marked text

<small> 

It is used to Smaller text

<del> 

It is used to Deleted text

<strike> 

It is used to strike the text

<ins> 

It is used to Inserted text

<u> 

It is used to underline the text

<sub> 

It is used to Subscript text

<sup> 

It is used to Superscript text

 

HTML <strong> And <b> Element

The HTML element <strong> is used for strong the text with importance.

The html element <b> is used for bold the text, without any extra importance.

Let see the example.

Example

Try Now


   <body>
       <strong>Html Formatting</strong>  
       <p>We are learning <strong> HTML </strong> and <b> Element </b> Formatting</p>
  </body>

HTML <em> and <i> Elements

The HTML <em> is used to italic a text. it defines emphasized text. ( it will be pronounce the words in  <em> with and emphasis, using verbal stress. )

The Html <i> element is used to for italic the text. it define a part of text in an alternate voice or mood. ( it is often used to indicate a technical term, a phrase from another language, a thought, a ship name etc.

Try Now

<body>
<i>This is italic Text</i>
<em>This is emphasized text</em>
</body>

HTML <mark> Element

The HTML <mark> element is used to highlight the text with default color yellow. It is often used when some important point show on the web pages.

Example

Try Now

<body>
   <mark>This is mark example</mark>
   <h1>We are learning <mark>HTML </mark> Formatting</h1>
</body>

HTML <small> Element

The HTML <small> element is used to small the text. if we want to show the small text then we can used this <small> tag.

Example

Try Now

<body>
   <p>This text is Without Small tag</p>
   <p><small>This text is With Small tag</small></p>
</body>

HTML <dell> And <strike>

The HTML <del> element is used to delete the text. It means when we writing any sentence in that sentence some word is wrong and I want to delete that one.

The HTML <strike> element is used to strike the text. it is similar like <del>.

Example

Try Now

<body>
   <p>This text is <strike>Strike</strike> element </p>
   <p>This text is <del>Del</del> element</del></p>
</body>

HTML Inserted <ins> And <u> Underline text

The HTML <inc> element is used to displayed as inserted. Text appears within <ins>...</ins> element.

The HTML <u> element is used to underline the text. it shows some important point.

Example

Try Now

 <body>
     <p>This is the <ins>Inserted </ins> Text</p>
     <p>This is the <u>Underline </u> Text</p>
 </body>

The HTML Superscript <sup> text

The HTML <sup> superscript element is used to some text height above the other text. it is often used in mathematical term. Like power. 

Example

Try Now

<body>
     <p>This is the:  (a+b) <sup>2 </sup> element Text</p>
     <p>(a+b) <sup>2 </sup> = a <sup>2</sup>+ b <sup>2</sup>+2ab</p>
   </body>

The HTML Subscript <sub> text

The HTML <sub> subscript element is used to some text below the other text. it is often used in mathematical term.

Example

Try Now

  <body>
      <p>This is the: A<sub>2 </sub> + B<sub>2 </sub> element Text</p>
     <p> HTML <sub>CSS</sub>
   </body>


Prev Next