0% found this document useful (0 votes)
4 views3 pages

Formatting Tags

The document provides an overview of various HTML formatting tags used to change the appearance of text, including tags for bold, italic, underline, and more. Each tag is described with its purpose and an example of usage. Additionally, the document includes a sample HTML code demonstrating the application of these formatting tags.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Formatting Tags

The document provides an overview of various HTML formatting tags used to change the appearance of text, including tags for bold, italic, underline, and more. Each tag is described with its purpose and an example of usage. Additionally, the document includes a sample HTML code demonstrating the application of these formatting tags.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

<!--!

Formatting Tags -->

- Formatting Tags are used in HTML to change the appearance of text or


content, applying different styles such as bold, italic, underline, and more.

List of Formatting Tags

1. `<b>` Tag
- used for: Displays the content in bold format.

- Example: <b>This text is bold.</b>

2. `<strong>` Tag
- used for: Displays the content in bold format, and conveys that the
information is important.

- Example: <strong>Important text in bold.</strong>

3. `<i>` Tag
- used for: Displays the content in italic format.

- Example: <i>This text is italic.</i>

4. `<em>` Tag
- used for: Displays the content in italic format and adds emphasis, an
alternative to the `<i>` tag.

- Example: <em>Emphasized italic text.</em>

5. `<u>` Tag
- used for: Underlines the content.

- Example: <u>This text is underlined.</u>

6. `<ins>` Tag
- used for: Underlines the content, an alternative to the `<u>` tag, often
used to indicate inserted text.

- Example: <ins>Inserted and underlined text.</ins>

7. `<strike>` Tag
- used for: Strikes off (crosses out) the content.

- Example: <strike>This text is struck off.</strike>


8. `<del>` Tag
- used for: Strikes off the content, an alternative to the `<strike>`
tag, often used to indicate deleted text.

- Example: <del>Deleted text.</del>

9. `<q>` Tag
- used for: Provides quotations around the content.

- Example: <q>This is a quoted text.</q>

10. `<mark>` Tag


- used for: Highlights the content with a yellow background color.

- Example: <mark>This text is highlighted.</mark>

11. `<big>` Tag


- used for: Displays the content with a larger font size.

- Example: <big>This text is larger.</big>

12. `<small>` Tag


- used for: Displays the content with a smaller font size.

- Example: <small>This text is smaller.</small>

13. `<sup>` Tag


- used for: Displays the content as superscript, raising it above
the baseline.

- Example: H<sup>2</sup>O

14. `<sub>` Tag


- used for: Displays the content as subscript, lowering it below
the baseline.

- Example: CO<sub>2</sub>

15. `<code>` Tag


- used for: Displays the content in the "monospace" font family, often
used for code snippets.

- Example: <code>print("Hello, World!")</code>

16. `<pre>` Tag


- used for: Preserves both spaces and line breaks, displaying
content exactly as written, often used
for preformatted text.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Formatting Tag</title>
</head>
<body>
<h1>Formatting Tag</h1>
<hr>
<p> <b>this is b tag</b></p>
<p> <strong>this is strong tag</strong> </p>
<p> <i>this is i tag</i> </p>
<p> <em>this is em tag</em> </p>
<p> <u>this is u tag</u> </p>
<p> <ins>this is ins tag</ins></p>
<p> <strike>this is strike tag</strike></p>
<p> <del>this is del tag</del></p>
<p> <mark> this is mark tag</mark></p>
<p>this is sup tag => a <sup>2</sup> </p>
<p> (a+b)<sup>2</sup> = a <sup>2</sup> + b<sup>2</sup> + 2ab</p>
<p> this is sub tag=> H<sub>2</sub>O</p>
<p> H<sub>2</sub> + SO<sub>4</sub> = H<sub>2</sub>SO<sub>4</sub></p>

<p> <q>this is q tag</q> </p>


<p>Swami Vivekananda said <q>Be not Afraid of anything. You will do
Marvelous work. it is Fearlessness that brings Heaven even in a moment <q>
</p>

<p> this is code tag=><code>cosole.log("hello from javaScript")</code></p>

<p> <code> System.out.println("hello from java") <br>


print("hi from python") </code>
</p>

<p> <small>this is small tag</small> </p>


<p> <big>this is big tag</big></p>

<p>
<pre>
this is pre tag
hello
hi
bye
</pre>
</p>
</body>
</html>

You might also like