HTML Tutorial/Text Formatting

Formatting Elements

In HTML, there is a list of elements that specify text style.

Formatting elements were designed to display special types of text:

<html>
   <head>
      <title>first page</title>
   </head>
   <body>
      <p>This is regular text </p>
      <p><b> bold text </b></p>
      <p><big> big text </big></p>
      <p><i> italic text </i></p>
      <p><small> small text </small></p>
      <p><strong> strong text </strong></p>
      <p><sub> subscripted text </sub></p>
      <p><sup> superscripted text </sup></p>
      <p><ins> inserted text </ins></p>
      <p><del> deleted text </del></p>
   </body>
</html>

The <strong>1 tag is a phrase tag. It defines Important text.

Browsers display <strong> as <b>2, and <em>3 as <i>4.
However, the meanings of these tags differ: <b> and <i> define bold and italic text, respectively, while <strong> and <em> indicate that the text is "important".

1. <strong>
Defines important text.
2. <b>
Defines bold text.
3. <em>
Defines emphasized text.
4. <i>
Defines italic text.