All About Formatting in HTML

  • quotations
  • comments
  • colors


HTML formatting is the process of transforming text into a more appealing format. HTML allows us to format text without having to use CSS. HTML has a lot of formatting tags. Text can be bolded, italicized, or underlined with these tags.

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

<b> bold

Bold text is defined using the HTML <b> element, which has no special meaning.

<strong> important text

This tag is used to Define important text

<i> and <em> Elements

The HTML <i> element designates a section of text that is written in a different voice or mood. Italics are commonly used to display the information inside.

<small> and <mark> Elements

The HTML <small> element defines smaller text.

<del> and <ins> Elements

Text that has been removed from a document is represented by the HTML <del> element. In most cases, browsers will draw a line through the removed text.

<sub> and <sup> Elements

Subscript text is defined using the HTML <sub> element. Subscript text is half a character below the usual line, and it’s often in a smaller font. Chemical formulae, such as H2O, can be written in subscript text.

Quotation and Citation


A citation is used to show text in a format that is not the same as the rest of the text. The text within the citation element is often italicised. When quoting an author’s opinions or observations, a citation is usually necessary. An opening <CITE >tag and a closing </CITE> tag define the citation element.

<!DOCTYPE html>
<title>HTML Citation Example</title>

<img src="img1.jpg" width="150" height="70" alt="citation">
<p><cite>HTML Citation</cite> - This is HTML Citation Example</p>



<!DOCTYPE html>
<title>HTML Quotations Example</title>

<p>This is HTML Quotations Tutorial. <br />
Here you will learn about <br />
<q>HTML short quote and long quote</q> <br />
with examples.</p>


HTML Comments

Although HTML comments are not visible in the browser, they can aid in the documentation of your HTML source code.


<!- -This is a comment- ->

HTML Colors

HTML colors can be supplied using RGB, HEX, HSL, RGBA, or HSLA values, as well as established color names.

HTML Color Coding Methods

There are three distinct ways to set colors on your web page, as seen below:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store



We make your business smarter and broader through the power of the internet. Researcher | Web developer | Internet of things | AI |