In HTML , the following text formatting are :-
<b>- It is use to bold the text i.e. it is use to highlight the text .
eg.
<b>Hello, This is bold text.</b> -> Hello, This is bold text.<strong>- It is use to bold the text with more importance.
eg.
<strong> Hello, This is strong text.</strong> -> Hello, This is strong text.<i>- The text inside the tag will be displayed in italics.
eg.
<i> Hello, This is italic text.</i> -> Hello, This is italic text.<em>- It is same as<i>with Emphasized text.
eg.
<em> Hello, This is emphasized text.</em> -> Hello, This is emphasized text.
❗ Difference between <i> and <em> is that screen reader will pronounce the word in <em> with an emphasis , using verbal stress.
<mark>- The text should be marked or highlighted.
eg.
<a> This is <mark> mark </mark> text.</a> -> This is mark text.<small>- The text inside tag displayed smaller .
eg. <small> This is small text. </small> ->
This is small text.<del>- Browser will usually strike a line through deleted text.
eg.
<a>This is <del> deleted</del> text. </a> -> This is deleted text. <ins>- Browser will usually underline through inserted text.
eg.
<a>This is <ins> inserted</ins> text. </a> -> This is inserted text.<sub>- Subscript text
eg.
<a>This is <sub> subscripted</sub> text. </a> -> This is subscripted text.<sup>- Superscript text
eg.
<a>This is <sup> superscripted</sup> text. </a> -> This is superscripted text.
More other text formatting tags are available in HTML we will discussed it later with examples.. ๐
Examples of above elements in Codepen (link below๐)
HTML Quotation
- <blockqoute> - This element defines a section that is quoted from another source.
- <q> - This element defines short quotation.
- <abbr> - It defines abbreviation or acronym.
- <address> and <cite> - Both the tags display text in italics but they are used in address and giving a title to a creative work.
- <bdo> - This tag is use to override the current text direction.
HTML Comments
Comments are not displayed by the browser, but they can help document your HTML source code.
eg. <!-- This is comment--> , comment is written inside <!-- _______ -->
❗ Comment are also used for debugging HTML by comment out the lines of error code ... ๐
=================================================
Next we will learn HTML Colors .....
Keep learning !!!
LIKE , COMMENT , SHARE , SUBSCRIBE ....