HTML formatting includes many elements which give different styles to the text. These elements can format a simple text in different styles.
For example, we can make bold text by <b>, make the text italic by <i>. In addition to this, we will use different kinds of tags for different purposes.
i tag is used to give an italic style to a piece of text. The text will no longer be straight.
This paragraph is without any formatting.
This paragraph has been given italic style.Try </>
b tag is used to represent bold text with respect to its surrounding text. It is an inline element.
This text is not bold.
The letter heading was highlighted.Try </>
Its main purpose is to attract the attention of users to specific keywords in a large amount of text.
u element is used to underline text with respect to its surrounding text. It is an inline element.
This paragraph is simple.
The underlined text represents the spelling mistakes.Try </>
Its main purpose is to underline the spelling mistakes in a document.
em tag is used to emphasize text. It gives emphatic stress to the text.
This paragraph is simple without any formatting.
This paragraph is emphasized using em element.Try </>
This element resembles the italic element in style. But the position of em element in a sentence changes the meaning of the sentence.
They are different with respect to their use but are same with respect to style.
strong element is used to aware someone about the warning (seriousness), note (importance) or tip.
NOTE: The strong element should be used to represent seriousness, urgency in the text.
NOTE: The strong element should be used to represent seriousness, urgency in the text.Try </>
Both b (bold) and strong elements are same with respect to style but different with respect to their use.
mark tag is used to mark a piece of text. By default the background color of the marked text is yellow.
This paragraph has not been marked.
This paragraph is marked.Try </>
The main use of mark element is to highlight important points which are more relevant to the user's current activity.
small represents the small font-size of text.
Overuse of that thing will cause disaster.
Overuse of that thing will cause disaster. Try </>
The small element is commonly used for side comments, copyright information or important text.
Note:big element is not included in HTML5. Now CSS properties should be used to change the font-size.
del element defines the deleted text.
The text was not deleted.
The text was deleted.
ins element is used to represent the addition of text.
Here the text is already present.Try </>
sub element defines the subscript in an equation. This element is used to make a subscript. It default font-size is small.
vf = vi+at
vf= vi+atTry </>
sup element defines the superscript in an equation.
See the example below.
span element is used to style a piece of text. It is used to make annotations.
Hereare made using CSS properties.Try </>
var element is used to write variables in an expression. For example, S=at2
Here “S” is distance. “a” is acceleration and “t” is time. And these are variables.
Equation of distance is s = vt
Equation of distance is S = vtTry </>
Was this article helpful?