Formatting tags in html with example

HTML Formatting Tags with Examples

HTML provides various formatting tags that allow you to apply different styles and effects to your text. Here are some commonly used formatting tags along with examples of their usage:

## Bold Tag `<b>`

The `<b>` tag is used to make text bold.

Example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>webmasterbn</title>
</head>
<body>
<h3>Bold Tag Example</h3> 
<b>This text is bold</b>
</body>
</html>

## Italic Tag `<i>`

The `<i>` tag is used to italicize text.

Example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>webmasterbn</title>
</head>
<body>
<h3>Italic Tag Example</h3>
<i>This text is italic</i>   
</body>
</html>

## Emphasized Tag `<em>`

The `<em>` tag is used to emphasize text.

Example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>webmasterbn</title>
</head>
<body>
<h3>Emphasized Tag Example</h3>
<em>This text is emphasized</em>    
</body>
</html>

## Marked Tag `<mark>`

The `<mark>` tag is used to highlight or mark text.

Example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>webmasterbn</title>
</head>
<body>
<h3>Marked Tag Example</h3>
<mark>This text is marked</mark>    
</body>
</html>

## Deleted Tag `<del>`

The `<del>` tag is used to indicate deleted or removed text.

Example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>webmasterbn</title>
</head>
<body>
<h3>Deleted Tag Example</h3>
<del>This text is deleted</del>
</body>
</html>

## Superscript Tag `<sup>`

The `<sup>` tag is used to create superscript text, often used for exponents or footnotes.

Example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>webmasterbn</title>
</head>
<body>
<h3>Superscript Tag Example</h3>
a<sup>2</sup>b    
</body>
</html>

## Subscript Tag `<sub>`

The `<sub>` tag is used to create subscript text, commonly used for chemical formulas and mathematical notations.

Example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>webmasterbn</title>
</head>
<body>
<h3>Subscript Tag Example</h3>
H<sub>2</sub>O   
</body>
</html>

To observe the effects of these formatting tags, you can copy and paste the respective examples into an HTML-supported application or a web browser. These tags enhance the visual appearance and semantic meaning of your text content on web pages.
Next Post Previous Post
No Comment
Add Comment
comment url