Tuesday, 7 March 2023

HTML Text Formatting

 

HTML Formatting

HTML Formatting is a process of formatting text for better look and feel. HTML provides us ability to format text without using CSS. There are many formatting tags in HTML. These tags are used to make text bold, italicized, or underlined. There are almost 14 options available that how text appears in HTML and XHTML.

In HTML the formatting tags are divided into two categories:

  • Physical tag: These tags are used to provide the visual appearance to the text.
  • Logical tag: These tags are used to add some logical or semantic value to the text.
Here, we are going to learn 14 HTML formatting tags. Following is the list of HTML formatting text.

Element nameDescription
<b>This is a physical tag, which is used to bold the text written between it.
<strong>This is a logical tag, which tells the browser that the text is important.
<i>This is a physical tag which is used to make text italic.
<em>This is a logical tag which is used to display content in italic.
<mark>This tag is used to highlight text.
<u>This tag is used to underline text written between it.
<tt>This tag is used to appear a text in teletype. (not supported in HTML5)
<strike>This tag is used to draw a strikethrough on a section of text. (Not supported in HTML5)
<sup>It displays the content slightly above the normal line.
<sub>It displays the content slightly below the normal line.
<del>This tag is used to display the deleted content.
<ins>This tag displays the content which is added.
<big>This tag is used to increase the font size by one conventional unit.
<small>This tag is used to decrease the font size by one unit from base font size.

Example:

<html>

                <head>

                                <title>Body and its attribute</title>

                </head>

                <body bgcolor="pink">

                    

                                 <center>

                                      <h1> <b>This is bold</b>

                                                  <hr color="black">

                                                  <p><i>This is italic</i></p>

                                                  <hr color="black">

                                                  <p><u>This is underline</u></p>

                                                  <hr color="black">

                                                  <p> hi<sub>This is subscript</sub></p>

                                                  <hr color="black">

                                                  <p>hi<sup>This is superscript</sup></p>

                                                  <hr color="black">

                                                  <p><strike>This is strike</strike></p>

                                                  <hr color="black">

                                                  <p><strong>This is strong</strong></p>

                                                  <hr color="black">

                                                  <p><big>This is big</big></p>

                                                  <hr color="black">

                                                  <p><em>This is empasize</em></p>

                                                  <hr color="black">

                                                  <p><tt>This is type writer</tt></p>

                                                  <hr color="black">

                                                  <p><blink>This is blink</blink></p>

                                                  <hr color="black">

                                                  <p><abbr title="abbrivation">abbr</abbr></p>

                                                  <hr color="black">

                                       <blockquote>Hi my name is Micheal i love india and its culture very much

                                                           Hi my name is Micheal i love india and its culture very much

                                              <hr color="black">

                                                  </blockquote>

                                                  <q>         Hi my name is Micheal i love india and its culture very much

                                                              Hi my name is Micheal i love india and its culture very much

                                                 </q>

                                 </center>

               </body>

</html>

 





No comments:

Post a Comment

Full Form of IT and ITes Industry

                                                 Full Form (IT and ITeS) ICT - Information Communication Technology IT - Information Tec...