HTML Text Formatting | Comments in HTML 5
In this lecture, we are going to discuss HTML Text Formatting | comments. In the previous tutorials, we discussed HTML headings and their importance.
HTML Text Formatting
HTML defines the different styles of Text Formatting and every single Element has a special meaning. Like, <b> Elements is used to define Bold text, and <i> Elements is used to define Italic text. HTML contains many elements to use in text formatting.
HTML Comments
In the Source Code, Comments are used to write the description. It is very helpful to read the source code. Comments in HTML start with Elements and End with –>. The browser ignores the comments at runtime. The Browser does not show it in the output result. You can also use multiline comments in HTML.
The source code of Text Formatting | Comments
<!DOCTYPE html> <html> <head> <title>Text Formatting</title> </head> <body> <!-- This is Comments --> <!--Bold Text --> <b> This is <mark>Bold</mark> text </b><br> <!-- Italic Text --> <i> This is Italic Text </i><br> <!-- Strong Text --> <strong> This is strong Text </strong><br> <!-- To Show Deleted Text --> <p> This <del>text</del> is Deleted </p><br> <!-- Superscripts --> <p> This is <sup>superscripts</sup> text </p> <!-- Subscripts --> <p> This is <sub>suberscripts</sub> text </p> </body> </html>
Detailed of Example Program
[mks_pullquote align=”left” width=”848″ size=”15″ bg_color=”#83d648″ txt_color=”#ffffff”]Bold Text in HTML
The HTML Tag <b> is used to define bold Text, and have no extra priority.
<b> This is Bold text </b>
Output: This Bold text
[/mks_pullquote] [mks_pullquote align=”left” width=”848″ size=”15″ bg_color=”#d8c047″ txt_color=”#2d2d2d”]Italic Text in HTML
<i> Elements is used to define Italic Text.
<i> This is italic Text </i>
Output: This is italic Text
[/mks_pullquote] [mks_pullquote align=”left” width=”848″ size=”15″ bg_color=”#83d648″ txt_color=”#ffffff”]Strong Text in HTML
The HTML Tag <strong> is used to define strong Text, and have some semantic extra priority.
<b> This is Bold text. </b>
Output: This strong text.
Deleted Text in HTML
The HTML Tag <del> is used to define Deleted Text.
<p> This  <del> text </del> is deleted. </p>
Output: This  text is deleted.
[/mks_pullquote] [mks_pullquote align=”left” width=”848″ size=”15″ bg_color=”#83d648″ txt_color=”#ffffff”]SuperScripts Text in HTML
The HTML Tag <sup> is used to define superscripts Text.
<p> This  <sup> text </sup> is superscripts. </p>
Output: This  text is superscripts.
[/mks_pullquote] [mks_pullquote align=”left” width=”848″ size=”15″ bg_color=”#d8c047″ txt_color=”#2d2d2d”]SubScripts Text in HTML
The HTML Tag <sub> is used to define subscripts Text.
<p> This  <sub> text </sub> is subscripts. </p>
Output: This  text is subscripts.
[/mks_pullquote]To get the list of Text formatting Elements, write a simple query on your search engine.
I hope this article is very helpful to understand the basic concept of HTML Text Formatting | Comments. You can also learn about CSS3, PHP7, and Computer Graphic. Give your Feedback. Thanks.