Horje
What is HTML Text Formatting

HTML contains several elements for defining text with a special meaning.

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.

NOTE: There are some physical and logical tags which may give same visual appearance, but they will be different in semantics.

Here, we are going to learn 14 HTML formatting tags. Following is the list of HTML formatting text.

Element name Description
<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 of HTML Text Formatting

HTML contains several elements for defining text with a special meaning. It is made changing Various activities of Text.
<p><b>This text is bold</b></p>
<p><i>This text is italic</i></p>
<p>This is<sub> subscript</sub> and <sup>superscript</sup></p>

Full Example of HTML Text Formatting

index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<p><b>This text is bold</b></p>
<p><i>This text is italic</i></p>
<p>This is<sub> subscript</sub> and <sup>superscript</sup></p>

</body>
</html>

Output should be:

Full Example of HTML Text Formatting





Related Articles
What is HTML Text Formatting HTML Formatting
What is HTML Formatting Elements HTML Formatting
How to create HTML <b> and <strong> Elements HTML Formatting
How to create HTML <strong> Elements HTML Formatting
How to create HTML <i> Elements HTML Formatting
How to create HTML <em> Elements HTML Formatting
How to create HTML <small> Element HTML Formatting
How to create HTML <mark> Element HTML Formatting
How to create HTML <del> Element HTML Formatting
How to create HTML <ins> Element HTML Formatting
How to create HTML <sub> Element HTML Formatting
How to create HTML <sup> Element HTML Formatting

Single Articles
Example of HTML Text FormattingHTML Formatting
Full Example of HTML Text FormattingHTML Formatting

Read Full:
HTML Formatting
Category:
Web Tutorial
Sub Category:
HTML Formatting
Uploaded:
1 year ago
Uploaded by:
Admin
Views:
103


Reffered: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_formatting_intro

Share on: