Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
HTML Tutorial

More


HTML Subscript
Subscript

Subscript is a formatting element used to make text downward and is used to write formulae either chemical formulae or mathematical formulae. You can write any value having downward direction by using subscript tag

Syntax

<sub>Content</sub>

Or

<tag><sub>Content</sub></tag>


You can apply subsript element to any element and use any where within a HTML document.


Example

H2O is a chemical formula of water


Subscript is a pair tag and output of subscript element is downward text like you can see in above example.


Practice Task

Open notepad or any other text editor, follow the following points.


  • Create heading 3
  • Assign text I love Desining to heading 3
  • Use <sub> element to make Designing downward of I love text

save file with name task.html or task.htm and then open it using any browser and see results.


Solution

I LoveDesigning


Don't forget subscript is non empty element which means it always comes in pair.