Formatting Tags

Formatting tags in HTML are used to format text, to make text bold, to make text italic, to make text superscript or subscript, to strike text, etc. Sometimes we need to highlight text on a paragraph then we use formatting tag bold tag to make text bold.


What are Formatting Tags?

Formatting tags are used to format text, highlight text or to make text italic, etc. There are the following formatting options available in HTML:

  1. bold
  2. italic
  3. superscript
  4. subscript
  5. strike
  6. small


1. bold:  
to make text bold, in an HTML there are two tags available, which are the following:

  • <b>:  it is used to make text bold, it is used only to highlight text which is not a searchable word.
  • <strong>:  it is used to make text bold, it is used to bold keywords or words which are important or searchable, search engines consider strong tag as an important word.


Example:

<!DOCTYPE  html>
<html>
<head>
</head>
 
<body>
 
<p>
This is an advanced <strong>Web Design & Development course</strong> offered by one of the Best web design institute in Rohini which is aimed at preparing you for the needs of a modern web design & development industry. This course is well suited for <b>professional as well as freshers</b>, who are looking their career in IT Industry. The course curriculum has been prepared with inputs from experts and designers working in leading web design companies and MNCs.
</p>
 
</body>
</html>
 


2. italic:
 To make text italic, in an HTML there are two tags available, which are the following:

  • <i>: It is used to make text italic, it is used only to highlight text that is not searchable.
  • <em>: It is used to make text italic, it is used to italic keywords or searchable words which is important.


Example:

<!DOCTYPE  html>
<html>
<head>
</head>
 
<body>
 
<p>
This is an advanced <em>Web Design & Development course</em> offered by one of the Best web design institutes in Rohini which is aimed at preparing you for the needs of a modern web design & development industry. This course is well suited for <i>professional as well as freshers</i>, who are looking their career in IT Industry. The course curriculum has been prepared with inputs from experts and designers working in leading web design companies and MNCs.
</p>
 
</body>
</html>
 


3. superscript:
In an HTML we use <sup></sup> tag to make a text superscript, in math we write a square of numbers which is a little bit upper on a normal number like this:

 22


To write such type of text we use <sup></sup> tag.


Example:

<!DOCTYPE html>
<html>
<head>
</head>
 
<body>
<p>10<sup>th</sup></p>
</body>
</html>
 


4. subscript:
In an HTML we use <sub></sub> tag to make text subscript, in science we write a formula like this:

CO2


To write such type of text we use <sub></sub> tag.


Example:

<!DOCTYPE html>
<html>
<head>
</head>
 
<body>
<p>CO<sub>2</sub></p>
</body>
</html>
 


5. strike:  
It is used to mark text as deleted or give a cut on text. It is usually seen on eCommerce websites to strike-through price.

Example:

<!DOCTYPE html>
<html>
<head>
</head>
 
<body>
<p>4000<strike>8000</strike></p>
</body>
</html>


6. small:
It is used to make text small as compared to normal size.

Example:

<!DOCTYPE html>
<html>
<head>
</head>
 
<body>
<p>hello<small>small text</small></p>
</body>
</html>

Categories: web designing html

Trending Courses

CodeIgniter

Regular : 45 Days

Fastrack : 20 Days

Crash : 10 Days

Advance Digital Marketing

Regular : 6 Months

Fastrack : 3 Months

Crash : 2 Months

React JS

Regular : 45 Days

Fastrack : 20 Days

Crash : 7 Days

Laravel

Regular : 45 Days

Fastrack : 20 Days

Crash : 10 Days

Front End Developer

Regular : 7 Month

Fastrack : 4 Month

Crash : 2 Month

Related Blogs

Request For Demo