Advertisement

Advertisement


HTML Formatting Tags

HTML Formatting is a process of changing appearance of text for better look and feel than the default text. The formatting tags are used to make text bold, italic, underlined, etc. There are almost 12 options available that how text appears in HTML.

Some tags are:

  • Bold Text <b>
  • Italic Text <i>
  • Underlined Text <u>
  • Important Text <strong>
  • Small Text <small>
  • Big Text <big>
  • Mark Text <mark>
  • Emphasized Text <em>
  • Deleted Text <del>
  • Inserted Text <ins>
  • Subscripted Text <sub>
  • Superscripted Text <sup>

HTML Bold Text

The HTML <b> element defines bold text, without any extra importance.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Bold Text </title>
</head>
<body>
<p> This is Normal text. </p>
<b> This is Bold Text. </b>
</body>
</html>

Output

HTML Bold Text Example

This is normal text.

This is Bold Text.

HTML Italic Text

The HTML <i> element defines italic text.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Italic Text </title>
</head>
<body>
<p> This is normal text </p>
<i> This is italic Text </i>
</body>
</html>

Output

HTML Italic Text Example

This is normal text

This is italic Text

HTML Underlined Text

The HTML <u> element defines Underlined text.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Underlined Text </title>
</head>
<body>
<p> This is Normal text </p>
<u> This is Underlined Text </u>
</body>
</html>

Output

Underlined Text

This is Normal text

This is Underlined Text

HTML Strong Text

The HTML <strong> element defines strong text. This tag is same as <b> Tag.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Strong Text </title>
</head>
<body>
<p> This is Normal text </p>
<strong> This Text is Strong </strong>
</body>
</html>

Output

HTML Strong Tag Example

This is Normal text

This Text is Strong

HTML Small Text

The HTML <small> element defines small text.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Small Text </title>
</head>
<body>
This text is <small> small </small>.
</body>
</html>

Output

HTML Small Tag Example This text is small .

HTML Big Text

The HTML <big> element defines BIG text.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> HTML Big Tag </title>
</head>
<body>
This text is <big> BIG </big>
</body>
</html>

Output

HTML Big Tag Example This text is BIG

HTML Marked Text

The HTML <mark> element defines Highlighted text.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Mark Tag </title>
</head>
<body>
This text is <mark> Marked. </mark>
</body>
</html>

Output

HTML Mark Tag Example This text is Marked.

HTML Emphasized Text

The HTML <em> element defines Emphized text.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Emphasize Text </title>
</head>
<body>
This text is Normal.
This text is <em> Emphasized. </em>
</body>
</html>

Output

HTML Emphasize Tag Example This text is Normal.
This text is Emphasized.

HTML Deleted Text

The HTML <del> element defines Deleted text.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Delete Text </title>
</head>
<body>
<p> This text is Normal. </p>
This text is <del> Deleted. </del>
</body>
</html>

Output

HTML Delete Tag Example

This text is Normal.

This text is Deleted.

HTML Inserted Text

The HTML <ins> element defines inserted (added) text.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Insert Text </title>
</head>
<body>
This text is <ins> inserted. </ins>
</body>
</html>

Output

Insert Text This text is inserted.

HTML Subscripted Text

The HTML <sub> element defines subscripted text.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Subscript Text </title>
</head>
<body>
This text is <b> bold. </b>
This text is <i> italic. </i>
This text is <sup> Subscripted. </sup>
</body>
</html>

Output

HTML Subscript Tag Example This text is bold.
This text is italic.
This text is Subscripted.

HTML Superscripted Text

The HTML <sup> element defines superscripted text.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Superscript Tag </title>
</head>
<body>
This text is <b> bold. </b>
This text is <i> italic. </i>
This text is <sup> Superscripted.
</body>
</html>

Output

HTML Superscript Tag Example This text is bold.
This text is italic.
This text is Superscripted.

HTML Label

The <label> tag does not give anything special to the user. It provides a label for the input fields used in a form. The <label> tag defines a label for a <button>, <input>, <meter>, <output>, <progress>, <select>, or <textarea> element.

Radio Buttons with Label


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> HTML label Tag </title>
</head>
<body>
<form action="action-page.php">
<label for="male">Male</label>
<input type="radio" name="gender" id="male" value="male">
<label for="female">Female</label>
<input type="radio" name="gender" id="female" value="female">
<label for="other">Other</label>
<input type="radio" name="gender" id="other" value="other"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>

Output

HTML label Tag

















Become a Patron!

Note: If the updated content is not visible to you please refresh the cookies by pressing CTRL + Shift + R.