Loading Please Wait...

Logo Lynxsia IT Solutions

HTML Formatting

HTML Formatting

There are various elements that can be used to format HTML documents with special meaning.

These elements include <b>, <strong>, <i>, <em>, <u>, <small>, <mark>, <ins>, <del>, <sup>, <sub>

<b> And <strong> Element

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

The <strong> element defines bold text with strong importance.

Let's see with some example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <b>This text is bold</b><br>
              <strong>This text is important</strong>
            </body>
          </html>
        
      
Though both <b> and <strong> are displayed the same in the browser, browser and screen reader give different preferences to the element
<i> And <em> Element

The <i> element defines the text in alternate voice and mood. The text inside it is displayed in italic and used to define some technical term, phrase, or thought.

The <em> element defines the emphasized text. The text inside it is displayed in italic. The browser/screen reader treats this text in a different tone (emphasized tone).

Let's see with some example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <i>This text is italic</i><br>
              <em>This text is emphasized</em>
            </body>
          </html>
        
      
<small> And <mark> Element

The <small> element defines smaller text.

The <mark> element defines highlighted or marked text.

Let's see with some example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <small>This text is small</small><br>
              <p>This text is <mark>highighted</mark></p>
            </body>
          </html>
        
      
<u>, <ins> And <del> Element

The <u> element defines the unspoken text that s styled differently. The text inside it is displayed as underlined. This represents some misspelled words, words from a different language, etc.

The <ins> element defines the text that is inserted into the document and usually displayed as underline.

The <del> element defines the text that is deleted from the document and usually displayed an strikethrough.

Let's see with some example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <p>This text is <u>misspelled</u></p>
              <p>This text is <ins>inserted</ins></p>
              <p>This text is <del>deleted</del></p>
            </body>
          </html>
        
      
<sup> And <sub> Element

The <sup> element defines the superscript text. The text is half a character above from the baseline.

The <sub> element defines the subscript text. The text is half a character below from the baseline.

Let's see with some example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <p>This text is <sup>superscript</sup>. Example: X<sup>10</sup> </p>
              <p>This text is <sub>subscript</sub>. Example: log<sub>10</sub></p>
            </body>
          </html>
        
      

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved