sup tag
style tag
TAG: sub
<sub> ... </sub>
The
sub
tag is used to insert subscript into a text. This allows the correct display of chemical equations, footnotes, math formulas, and scientific notation on a web page.
Most browsers reduce the text size by half for the subscript (and superscript), but use the same font face as used for the rest of the text. However, you can use style sheets and the
style
attribute to effect the appearance of the text to suit your desires.
The similar
sup
tag is used to create superscripts.
The separate closing tag is mandatory.
Attributes and Events
class
dir
id
lang
onclick
ondblclick
onkeydown
onkeypress
onkeyup
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
style
title
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="eng">
<head>
<title>DevGuru XHTML sub Tag Example</title>
</head>
<body>
2H<
sub style="color:green;"
>2<
/sub
>+O<
sub style="color:green
>2<
/sub
> -> 2H<
sub style="color:green;"
>2<
/sub
>O
</body>
</html>
Output:
2H
2
+O
2
-> 2H
2
O
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information