In this blog post, I am going to let you know about HTML Text Formatting.
However, we have explained you about the style attribute in the previous blog post where we told you to format the text with the help of style attribute. but there are some more special HTML element which can be used for formatting the text. See the few examples for HMTL formatting below.
So now we will look for some more element which is used to format the HMTL text. For example, <b> and <i> are some special element which is used to get Bold and Italic formatting output.
This formatting element was designed to get a special type of text formatting. Now we will see few more element and their special effect over text.
Below you can see the list of some special elements.
<b> – Bold text
<strong> – Important text
<i> – Italic text
<em> – Emphasized text
<mark> – Marked text
<small> – Small text
<del> – Deleted text
<ins> – Inserted text
<sub> – Subscript text
<sup> – Superscript text
We will see these special element one by one with one example.
<b> defines a bold text where it the text is not considered to be important. this tag is just a way to style the text as bold.
<b>This text is bold</b>
this tag is display the text as strong formate which looks alike <b> but there is difference between these two tag. <strong> tag is used for the text which is important.
<strong>This text is strong</strong>
this tag is used to define the italic tag which is not considered to be more important.
<i>This text is italic</i>
this element is defines emphasized text, which has some important mearnning.
<em>This text is emphasized</em>
This element is used to get smaller text.
<h3>HTML <small>Small</small> Formatting</h3>
This element is used to highlight or mark any particular text.
<h3>HTML <mark>Marked</mark> Formatting</h3>
This element defines the text which has been (deleted)removed from the text.
<p>My favorite color is <del>blue</del> grey.</p>
This element defines inserted(addded) text.
<p>My favorite <ins>color</ins> is blue.</p>
This element used to define the <sub>subscripted</sub> text.
<p>This is <sub>subscripted</sub> text.</p>
This element is used to define <sup>superscripted</sup> text.
<p>This is <sup>superscripted</sup> text.</p>
In a case of any queries, you can write us at email@example.com we will get back to you ASAP.
Hope! you would have enjoyed this post.
Please feel free to give your important feedbacks in the comment section below.
Have a great time! Sayonara!