Web4College

HTML Formatting

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.

Italic text

i tag is used to give an italic style to a piece of text. The text will no longer be straight.

Preview Example
Try it

Bold text

b tag is used to represent bold text with respect to its surrounding text. It is an inline element.

Preview Example
Try it

Its main purpose is to attract the attention of users to specific keywords in a large amount of text.

Underlined text

u element is used to underline text with respect to its surrounding text. It is an inline element.

Preview Example
Try it

Its main purpose is to underline the spelling mistakes in a document.

Emphasized text

em tag is used to emphasize text. It gives emphatic stress to the text.

Preview Example
Try it

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

strong element is used to aware someone about the warning (seriousness), note (importance) or tip.

Preview Example
Try it

Both b (bold) and strong elements are same with respect to style but different with respect to their use.

mark element

mark tag is used to mark a piece of text. By default the background color of the marked text is yellow.

Preview Example
Try it

The main use of mark element is to highlight important points which are more relevant to the user's current activity.

small element

small represents the small font-size of text.

Preview Example
Try it

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

del element defines the deleted text.

Preview Example
Try it

insert element:

ins element is used to represent the addition of text.

Preview Example
Try it

sub element

sub element defines the subscript in an equation. This element is used to make a subscript. It default font-size is small.

Preview Example
Try it

sup element

sup element defines the superscript in an equation.

See the example below.

Preview Example
Try it

span element

span element is used to style a piece of text. It is used to make annotations.

Preview Example
Try it

Var element:

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.

Preview Example
Try it