Example of Text Formatting

HTML
<!DOCTYPE html>
<html>

<head>
    <title>
        HTML text formatting
    </title>
</head>

<body>
    <h2>Welcome To w3wiki</h2>

    <!--Text in Bold-->
    <b>Hello Geeks</b>
    <br>
  
      <!--Text in Strong-->
    <strong>Hello Geeks</strong>
    <br>
  
      <!--Text in Italic Text-->
    <i>Hello Geeks</i>
    <br>    
  
       <!--Text in Emphasized-->
    <em>Hello Geeks</em>
    <br>

      <!--Text in marked-->
    <mark>Hello Geeks</mark>
    <br>
  
      <!--Text in deleted-->
    <del>Hello Geeks</del>
    <br>
  
      <!--Text in inserted-->
    <ins>Hello Geeks</ins>
    <br>
  
      <!--Text in subscript-->
      <p><sub>Hello</sub> Geeks</p>
    <br>
  
      <!--Text in superscript-->
      <p><sup>Hello</sup> Geeks</p>
    <br>
</body>

</html>

Output:

HTML Text Formatting

HTML Text Formatting provides various tags for text formatting to enhance the visual presentation of content on a webpage. You can make your text bold, italic, etc. by using some HTML tags. When creating web content, effective text formatting is important for improving readability and user experience. In this guide, we’ll explore various HTML tags that allow you to format text, making it visually attractive and semantically meaningful.

HTML text formatting can be categorized into two techniques:

  1. Logical Tags: These tags denote the logical or semantic value of the text. They convey meaning without directly affecting the visual appearance. Examples include <em> (for emphasis) and <strong> (for important content).
  2. Physical Tags: These tags directly impact the visual appearance of the text. They alter font styles, sizes, and other visual properties. Examples include <b> (for bold) and <i> (for italic).

Table of Content

  • HTML Formatting Elements
  • Making text Bold or Strong
  • Making text Italic or emphasize
  • Highlighting a Text
  • Making a text as Subscript or Superscript
  • Making text smaller
  • Striking through the text
  • Adding a Text
  • Supported Browsers

Similar Reads

HTML Formatting Elements

TagsDescriptionsShowcases italicized text.Renders text in a smaller font size.Highlights added or inserted text.Creates subscript text.Emphasizes text with importance, often in bold.Displays text in a bold format.Accentuates text with a background highlight.Strikes through text to signify deletion.Adds emphasis to text, commonly styled as italic.Formats text as superscript....

Example of Text Formatting

HTML HTML text formatting

Welcome To GeeksforGeeks

Hello Geeks
Hello Geeks
Hello Geeks
Hello Geeks
Hello Geeks
Hello Geeks
Hello Geeks

Hello Geeks


Hello Geeks


...

Supported Browsers

Google Chrome 1Microsoft Edge 12Firefox 1Opera 12.1Safari 1...