HTML Formatting

What is Formatting in HTML?

Refers to the use of HTML tags to control the appearance and structure of text and other elements on a web page.

HTML Formatting

There are greater than 13 HTML formatting tags provided to us. HTML formatting tags permit us to style text without using CSS.

Bold Text

The HTML <b> element defines bold text in HTML

                            
                                <p>This is a <b>bold text</b></p>
  <p>This is a <strong>strong text</strong></p>
                            
                        

Italic Text

The <i> tag defines a part of text in an alternate voice or mood.

                            
                                <p>This is an <i>italic text</i></p>
  <p>This is an <em>emphasized text</em></p>
                            
                        

Underlined Text

The <u> tag represents some text that is unarticulated and styled differently from normal text,

                            
                                <p class="underlined">This is underlined text with a custom color.</p>
  <u>Another way of underline</u>
                            
                        

Strike Text

The <s> HTML element renders text with a strikethrough, or a line through it

                            
                                <p class="strikethrough">This is strikethrough text with a custom color.</p>
  <s>Another way of Strike Text</s>
                            
                        

monospace

The <tt> HTML element creates inline text which is presented using the user agent's default monospace font face.

This element was created for the purpose of rendering text as it would be displayed on a fixed-width display such as a teletype, text-only screen, or line printer.

                            
                                <p class="monospace">This is monospace text with a custom color.</p>
  <tt>Another way of Monospace example</tt>
                            
                        

Superscript

The <sup> tag defines superscript text.

Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font.

                            
                                <p>This is <sup>superscript text</sup> with a custom color.</p>
                            
                        

Subscript

The <sub> tag defines subscript text.

Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font.

                            
                                <p>This is paragraph <sub>subscript</sub> text with a custom color.</p>
                            
                        

Inseted

The <ins> tag defines a text that has been inserted into a document.

                            
                                <p>This is paragraph <ins>inserted</ins> text with a custom color.</p>
                            
                        

Deleted

The <del> tag in HTML stands for delete and is used to mark a portion of text which has been deleted from the document.

                            
                                <p>This is paragraph <del>deleted</del> text with a custom color.</p>
  <p>This is paragraph <del>Example Delete Text</del> text</p>
                            
                        

Larger

The <big> tag in HTML is used to increase the selected text size by one larger than the surrounding text.

                            
                                <p>This is paragraph <big>larger</big> text with a custom font size and color.</p>
                            
                        

Smaller

The <small> element represents side-comments and small print, like copyright and legal text, independent of its styled presentation.

                            
                                <p>This is paragraph <small>smaller</small> text with a custom font size and color.</p>