Html text formatting



 HTML Text Formatting:


Formatting text is very essential for web sites.


One of its uses is to help readers know the important parts a web content easily.


👉Elements for Formatting Text:


All of the elements listed below are inline elements:


  • <b>: bolds a text .


  • <i>: italicizes a text.


  • <u> : underlines a text .


  • <code> : defines a text as a code.

  • <tt> typewriter text.


  • <small>: makes a text smaller.


  •  <em>: emphasizes a text, may be italicized depending on the browser .


  • <strong>: emphasizes a text, may be boldened depending on the browser.


  • <mark> : marks a text like a highlighting pen.
  • <q> : enquotes a text.


  • <s> : strikes through a text.

Example:

<!-- bold -->

<b>I am a bolded text.</b>

<br />


<!-- italic -->

 <i>I am an italic text</i>

<br /> 


<!-- underlined -->

<u> I am an underlined text.</u>

 <br /> 


<!-- code -->

<code>I am a code text </code>

<br />


<!-- typewriter text --> 

<tt>I am a typewriter text.</tt>

<br />


<!-- small text -->

<small>I am a small text.</small> 

<br />

 <!-- emphasized text -->


<em>I am a an emphasized text.</em>

<br /> 


<!-- strong text -->

<strong>I am a strong text.</strong>

<br />


<!-- marked text -->

<mark>I am a marked text.</mark>

<br />


<!-- quoted text -->

<q>I am an enquoted text.</q>

<br />


<!-- striked text -->

 <s>I am a striked text.</s>

<br />


<!-- mixed formatted -->

 <b><i><u><mark><q> I am a mixed formatted text.


Output:


I am a bolded text.


I am an italic text.


I am an underlined text.


I am a code text.


I am a typewriter text.


I am a small text.


 I am a an emphasized text.


I am a strong text.


I am a marked text.


 "I am an enquoted text."


I am a striked text.


 "I am a mixed formatted text."


❤Thanks for visiting