JavaScript Tutorial

HTML Formatting

HTML Formatting is a way to make the text look better. It makes it possible to style our content without using CSS.

These formatting tags are used to make text bold, italicized, underlined, and to add other text styles. Following are the most commonly used tags : 

1. Bold Tag

The <b> tag is used to make the font bold in HTML. Anything placed within the opening and closing <b> tags will be displayed as bold in the browser.

Code Example for <b> 

Output

2. Italic Tag

This tag is used to make the font italic. Anything we placed within <i> tag, will display as italic.

Code Example for <i> 

Output

3. Mark Tag

This tag is used to mark or highlight a text. Anything we placed within the opening and closing <mark> tag, will be displayed as marked.

Code example for <mark>

Output:

4. Underline Tag

This tag is used to underline text. Anything we place within the <u> tag will be displayed as underlined.

Code example for <u>

Output:

5. Strike Tag

This attribute helps to add a thin line over text. Anything we placed within <strike> tags, will be displayed as strikethrough.

Code example for <strike>

Output:

6. Superscript Tag

This attribute is used to show content slightly above the baseline. Anything placed within the <sup> tags will appear as a superscript.

Code example for <sup>

Output:

7. Subscript Tag

This attribute is used to show content slightly below the baseline. Anything placed within the <sub> tag will appear as a subscript.

Code example for <sub>

Output:

8. Deleted Tag

The <del> tag is used to indicate that text has been deleted or removed from the document. It typically displays the deleted text with a strikethrough.

Code example for <del>

Output:

9. Inserted Tag

This attribute helps to show content as inserted. Anything we placed within <ins> tag, will come as inserted text.

Code example for <ins>

Output:

10. Larger and smaller Tag

This tag is used to change the font size of the content. Anything we place within the <big> or <small> tags will appear larger or smaller than the rest of the text, respectively.

Code example for <large> and <small>

Output:

Go back to Previous Course