HTML – Formatting

  • HTML formatting is used to style the text to make it more presentable.
  • These tags are used to define how text should be displayed on a web page.
  • used to change the appearance of text, such as making it bold, italic, underlined, or applying other formatting styles.

HTML Formatting Elements –> Here are HTML formatting tags given below:

  • <b> – Bold text
  • <strong> – Important text
  • <i> – Italic text
  • <em> – Emphasized
  • <mark> – Marked text
  • <small> – Smaller text
  • <del> – Deleted text
  • <ins> – Inserted text
  • <sub> – Subscript
  • <sup> – Superscript

NOTE: for extra design and styling use CSS

🚀 Try it yourself! Click the button below to run the code and see the output in action.

HTML Code

Output

Now I will cover every HTML Formatting given above in detail

<b> Tag– It is used to make text bold.
Example – <b> -This text is bold. </b>
Output--This text is bold.
<strong> Tag – It is used to define text with strong importance. The output is the same as bold.
Example – <strong> This text is important. </strong>
Output- This text is important.
<i> Tag -It is used to make the text italic .
Example – <i> This text is italic. </i>
Output- This text is italic.
<em> Tag – It is used to emphasize text. The output of the text is italic.
Example – <em> This text is emphasized. </em>
Output- This text is emphasized.
<mark> Tag – The <mark> tag is an HTML element used to highlight or mark a specific portion of text on a webpage.
Example – <p>This is used for <mark> This text is highlighted. </mark></p>
Output-This is used for This text is highlighted.
<small> Tag – This element is used for smaller text.
Example – <p>This is some<small> smaller text. </small></p>
Output- This is some small text.
<del> Tag – This element is used to delete text .
Example – <p>My fav channel is<del>DWR</del></p>
Output- My fav channel is DWR
<ins> Tag – It is used to insert text.
Example – <p>My fav channel is <ins> DWR </ins> </p>
Output-My fav channel is DWR
<sub> Tag – Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font. Subscript text can be used for chemical formulas.
Example – <p>My fav channel is<sub> DWR </sub>
Output- My fav channel is DWR.
<sup> Tag – Superscript text appears half a character above the normal line. It is used for footnotes.
Example – <p>My fav channel is<sub> DWR </sub>
Output- My fav channel is DWR.

So from the above tags, there are some tags that you will use frequently like – <i>,<b>,<sup>

so make sure don’t skip these 😂. wo bhi dhyan se.

agr dhyan se nahi padha then scroll up again and read it properly 😎. agar mann kare to sare hi dhyan se padh lena🤪

Important Note: Want to download the full HTML course as a PDF? Click here to save it locally!

Leave a Comment