The HTML Elements reference

"sub" - html element

This element is used for subscripts.

Starttag <sub> is Required and endtag </sub> is Required

Browsers that support the sub - element :

Element "sub" example:

<p>To create bold text, wrap the chosen word or phrase with <b> and
</b> tags</p><p>To italicize text, place the text between <i> and </i> tags.</p><p>To underline text, place the text between <u> and </u> tags.</p><p>To strike through text, use the <s> and </s> tags.</p><p>To produce a monospace (code-like) formatting, place the text
between <tt> and </tt> tags (stands for "teletype")</p><p>Superscript: a<sup>2</sup> x b<sup>2</sup> =
c<sup>2</sup></p><p>Subscript: H<sub>2</sub>O</p>

This attribute offers advisory information about the element for which it is set.

Attribute "title" example:

Chemical formula for water is H<SUB title='2 parts of Hydrogen' >2</SUB>O
and the chemical formula for methadone
is C<SUB title='21 parts of Carbon'>21</SUB>H<SUB title='27 parts of Hydrogen'>27</sub>NO.

Another attribute "title" example:

<html><head><title>title attribute</title></head><body ><h1 title="Heading 1">This is a Heading 1</h1><h2 title="Heading 2">This is a Heading 2</h2><h3 title="Heading 3">This is a Heading 3</h3><h4 title="Heading 4">This is a Heading 4</h4><h5 title="Heading 5">This is a Heading 5</h5><h6 title="Heading 6">This is a Heading 6</h6></body></html>

Event "onkeydown" value(s):
One or more script statements each ended with a semicolon.

The onkeydown event occurs when a key is pressed down over an element.

Attribute "onkeydown" example:

<html><head><title>onkeydown Event attribute</title></head><body bgcolor="Silver" text="Blue"
onkeydown="alert('you have pressed a key down')" >
The onkeydown event occurs when a
key is pressed down over an element.
</body></html>

Event "onkeypress" value(s):
One or more script statements each ended with a semicolon.

The onkeypress event occurs when a key is pressed and released over an element.

Attribute "onkeypress" example:

<html><head><title>onkeypress Event attribute</title></head><body bgcolor="Silver" text="Blue"
onkeypress="alert('you have pressed and released a key')" >
The onkeypress event occurs when a key is
pressed and released over an element.
</body></html>

Event "onkeyup" value(s):
One or more script statements each ended with a semicolon.

The onkeyup event occurs when a key is released over an element.

Attribute "onkeyup" example:

<html><head><title>onkeyup Event attribute</title></head><body bgcolor="Silver" text="Blue"
onkeyup="alert('A key is released over an element')" >
The onkeyup event occurs when a key is
released over an element.
</body></html>

Event "onmousedown" value(s):
One or more script statements each ended with a semicolon.

The onmousedown event occurs when the pointing device button is pressed over an element.

Event "onmousemove" value(s):
One or more script statements each ended with a semicolon.

The onmousemove event occurs when the pointing device is moved while it is over an element.

Attribute "onmousemove" example:

<html><head><title>onmousemove Event attribute</title></head><body bgcolor="Silver" text="Blue"
onmousemove="document.body.text='red'" >
The onmousemove event occurs when the
pointing device is moved while it is over an element.
</body></html>

Event "onmouseout" value(s):
One or more script statements each ended with a semicolon.

The onmouseout event occurs when the pointing device is moved away from an element.

Attribute "onmouseout" example:

<html><head><title>onmouseover and onmouseout Event attributes</title></head><body bgcolor="Silver" text="Blue"
onmouseover="document.body.text='red'"
onmouseout="document.body.text='black'" >
The onmouseover event occurs when the
pointing device is moved onto an element.<br>
The onmouseout event occurs when the
pointing device is moved away from an element.
</body></html>

Event "onmouseover" value(s):
One or more script statements each ended with a semicolon.

The onmouseover event occurs when the pointing device is moved onto an element.

Attribute "onmouseover" example:

<html><head><title>onmouseover and onmouseout Event attributes</title></head><body bgcolor="Silver" text="Blue"
onmouseover="document.body.text='red'"
onmouseout="document.body.text='black'" >
The onmouseover event occurs when the
pointing device is moved onto an element.<br>
The onmouseout event occurs when the
pointing device is moved away from an element.
</body></html>

Event "onmouseup" value(s):
One or more script statements each ended with a semicolon.

The onmouseup event occurs when the pointing device button is released over an element.

Attribute "onmouseup" example:

<html><head><title>onmouseup Event attribute</title></head><body bgcolor="Silver" text="Blue"
onmouseup="alert('The mouse button is released')" >
The onmouseup event occurs when the
pointing device button is released over an element.
</body></html>

(deprecated) The BASEFONT element is used to set a default font size. #You should include the element in the header section ($'head') of the document. #You should avoid using this as It is only supported by Internet Explorer.

Defines a script (javascript, vbscript ....) which may be used within a document. A script contains code which is executable.#
You may also include a version number to precisely inform the browser the support you need for the script.

The <BODY> tag contains the body of the document. It must come after the </$'head'> (if a header is specified). #
Everything between the <BODY> and </BODY> is considered part of the document body. #
It is the part of the document that is visible to the user.