HTML formatting is a process of formatting the text for better look and feel. HTML provides the ability to format the text without using CSS. And we can also find different types of formatting tags in HTML. If you are using these tags we can make our text into bold, italics, or underlined.
HTML Formatting Tags
In HTML formatting tags are divided into two types. They are as follows: Physical tag and logical tag.
- HTML Physical tag: The HTML physical tags are used to provide the visual appearance to the text.
- HTML Logical tag: The HTML logical tags are used to add some logic (or) the semantic value to the text.
And now we are listing some of the HTML formatting tags and their description as follows:
|<b>||It 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>||A physical tag which is used to make the text italic|
|<mark>||This tag is used to highlight text|
|<u>||Used to underline text written between it|
|<tt>||This tag is used to appear a text in teletype. (not supported in HTML5)|
|<strike>||used to draw a strikethrough on a section of text. (Not supported in HTML5)|
|<sup>||Displays the content slightly above the normal line|
|<sub>||It displays the content slightly below the normal line|
|<del>||used to display the deleted content|
|<ins>||This tag displays the content which is added|
|<big>||It is used to increase the font size by one conventional unit|
|<small>||It is used to decrease the font size by one unit from base font size|
HTML Bold text
If you want to display your text in a bold font without any logical importance. You have to enclose the text between <b> ….</b>
<p><b> Hey Freshersnow!</b></p>
And in the same way, we can also use the strong tag, which is similar to the bold tag.
HTML Italic text
This HTML tag was a physical tag, which helps you to make the text into an italic format. You should enclose the tag as <i>…..</i>
HTML Underline text
While writing the text if you wish to highlight the text by using underline and make as important. Then you should use this underline tag. You should enclose the tag <u>……</u>
HTML Strike text
If you wish to strike through your text, then this strike tag is useful for formatting text. It appears in thin line striking over the text. You should enclose the tag as <strike>……</strike>
<p><strike>Hey this is freshersnow</strike></p>
Hey this is freshersnow
If you wish to have each element the same width then you should write the content with <tt>…..</tt>
<p>Hi<tt>welcome to freshersnow website</tt></p>
Hi welcome to freshersnow website