HTML Learning:
The HTML Elements reference.
"ol" - html element
- This element defines an ordered list.
- Starttag <ol> is Required and endtag </ol> is Required
- The element contains one or more 'li' elements that define the actual items of the list.
- Browsers that support the ol - element :
Element "ol" example:
<body bgcolor="#eeeeee">
<h2>White Varietals</h2>
<ol>
<li> Chardonnay</li>
<li>Chenin Blanc</li>
<li>Fumé Blanc</li>
<li>Gewürztraminer</li>
<li>Grüner Veltliner</li>
<li>Marsanne</li>
<li>Muscat</li>
<li>Pinot Blanc</li>
<li>Pinot Gris</li>
<li>Reisling</li>
<li>Sauvignon Blanc</li>
<li>Sémillon</li>
<li>Trebbiano</li>
<li>Viognie</li>
</ol>
</body>
Attributes:
class , compact (deprecated), dir , id , lang , start (deprecated), style , title , type (deprecated)
Attribute "class" value(s): A list of style class names that must be separated by white space characters.
Attribute "compact" value(s): compact
Attribute "dir" value(s): ltr or rtl
Attribute "id" value(s): unique name
Attribute "lang" value(s): language-code
Attribute "start" value(s): number
Attribute "style" value(s): style
Attribute "title" value(s): text
Attribute "type" value(s): Look at each element for details. type information
class , compact (deprecated), dir , id , lang , start (deprecated), style , title , type (deprecated)
Attribute "class" value(s): A list of style class names that must be separated by white space characters.
- This attribute assigns a style class name or set of style class names to an element. Any number of elements may be assigned the same class name or names.
- You will find more about this in the CSS learning on this site.
Attribute "compact" value(s): compact
- This boolean attribute gives a hint to visual user agents to render the list in a more compact way.
- The interpretation of this attribute depends on the user agent.
Attribute "dir" value(s): ltr or rtl
- Specifies the base direction of directionally neutral text in an element's content and attribute values. It also specifies the directionality of tables.
Attribute value | description |
---|---|
ltr | Left-to-right text or table. |
rtl | Right-to-left text or table. |
Attribute "id" value(s): unique name
- This attribute assigns an identification name to an element. This name must be unique in a document
- Id is often used when one wants to search for an item using javascript or vbscript.
Attribute "lang" value(s): language-code
- Specifies the base language of an element's attribute values and text content.
Lang code | Name of Language |
---|---|
aa | Afar |
ab | Abkhazian |
af | Afrikaans |
ak | Akan |
sq | Albanian |
am | Amharic |
ar | Arabic |
an | Aragonese |
hy | Armenian |
as | Assamese |
av | Avaric |
ae | Avestan |
ay | Aymara |
az | Azerbaijani |
ba | Bashkir |
bm | Bambara |
be | Belarusian |
bn | Bengali |
bh | Bihari languages |
bi | Bislama |
bo | Tibetan |
bs | Bosnian |
br | Breton |
bg | Bulgarian |
my | Burmese |
ca | Catalan; Valencian |
cs | Czech |
ch | Chamorro |
ce | Chechen |
zh | Chinese |
cu | Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic |
cv | Chuvash |
kw | Cornish |
co | Corsican |
cr | Cree |
cy | Welsh |
cs | Czech |
da | Danish |
de | German |
dv | Divehi; Dhivehi; Maldivian |
nl | Dutch; Flemish |
dz | Dzongkha |
el | Greek, Modern (1453-) |
en | English |
eo | Esperanto |
et | Estonian |
eu | Basque |
ee | Ewe |
fo | Faroese |
fa | Persian |
fj | Fijian |
fi | Finnish |
fr | French |
fr | French |
fy | Western Frisian |
ff | Fulah |
ka | Georgian |
de | German |
gd | Gaelic; Scottish Gaelic |
ga | Irish |
gl | Galician |
gv | Manx |
el | Greek, Modern (1453-) |
gn | Guarani |
gu | Gujarati |
ht | Haitian; Haitian Creole |
ha | Hausa |
he | Hebrew |
hz | Herero |
hi | Hindi |
ho | Hiri Motu |
hr | Croatian |
hu | Hungarian |
hy | Armenian |
ig | Igbo |
is | Icelandic |
io | Ido |
ii | Sichuan Yi; Nuosu |
iu | Inuktitut |
ie | Interlingue; Occidental |
ia | Interlingua (International Auxiliary Language Association) |
id | Indonesian |
ik | Inupiaq |
is | Icelandic |
it | Italian |
jv | Javanese |
ja | Japanese |
kl | Kalaallisut; Greenlandic |
kn | Kannada |
ks | Kashmiri |
ka | Georgian |
kr | Kanuri |
kk | Kazakh |
km | Central Khmer |
ki | Kikuyu; Gikuyu |
rw | Kinyarwanda |
ky | Kirghiz; Kyrgyz |
kv | Komi |
kg | Kongo |
ko | Korean |
kj | Kuanyama; Kwanyama |
ku | Kurdish |
lo | Lao |
la | Latin |
lv | Latvian |
li | Limburgan; Limburger; Limburgish |
ln | Lingala |
lt | Lithuanian |
lb | Luxembourgish; Letzeburgesch |
lu | Luba-Katanga |
lg | Ganda |
mk | Macedonian |
mh | Marshallese |
ml | Malayalam |
mi | Maori |
mr | Marathi |
ms | Malay |
mk | Macedonian |
mg | Malagasy |
mt | Maltese |
mn | Mongolian |
mi | Maori |
ms | Malay |
my | Burmese |
na | Nauru |
nv | Navajo; Navaho |
nr | Ndebele, South; South Ndebele |
nd | Ndebele, North; North Ndebele |
ng | Ndonga |
ne | Nepali |
nl | Dutch; Flemish |
nn | Norwegian Nynorsk; Nynorsk, Norwegian |
nb | Bokmål, Norwegian; Norwegian Bokmål |
no | Norwegian |
ny | Chichewa; Chewa; Nyanja |
oc | Occitan (post 1500) |
oj | Ojibwa |
or | Oriya |
om | Oromo |
os | Ossetian; Ossetic |
pa | Panjabi; Punjabi |
fa | Persian |
pi | Pali |
pl | Polish |
pt | Portuguese |
ps | Pushto; Pashto |
qu | Quechua |
rm | Romansh |
ro | Romanian; Moldavian; Moldovan |
ro | Romanian; Moldavian; Moldovan |
rn | Rundi |
ru | Russian |
sg | Sango |
sa | Sanskrit |
si | Sinhala; Sinhalese |
sk | Slovak |
sk | Slovak |
sl | Slovenian |
se | Northern Sami |
sm | Samoan |
sn | Shona |
sd | Sindhi |
so | Somali |
st | Sotho, Southern |
es | Spanish; Castilian |
sq | Albanian |
sc | Sardinian |
sr | Serbian |
ss | Swati |
su | Sundanese |
sw | Swahili |
sv | Swedish |
ty | Tahitian |
ta | Tamil |
tt | Tatar |
te | Telugu |
tg | Tajik |
tl | Tagalog |
th | Thai |
bo | Tibetan |
ti | Tigrinya |
to | Tonga (Tonga Islands) |
tn | Tswana |
ts | Tsonga |
tk | Turkmen |
tr | Turkish |
tw | Twi |
ug | Uighur; Uyghur |
uk | Ukrainian |
ur | Urdu |
uz | Uzbek |
ve | Venda |
vi | Vietnamese |
vo | Volapük |
cy | Welsh |
wa | Walloon |
wo | Wolof |
xh | Xhosa |
yi | Yiddish |
yo | Yoruba |
za | Zhuang; Chuang |
zh | Chinese |
zu | Zulu |
Attribute "start" value(s): number
- Specifies the starting number of the first item in an ordered list. Note that while the value of this attribute is an integer, the corresponding label may be non-numeric. Thus, when the list item style is uppercase latin letters (A, B, C, ...), start=3 means "C". When the style is lowercase roman numerals, start=3 means "iii", etc.
- The default starting number is "1".
Attribute "style" value(s): style
- Specifies style sheet (CSS) information for the current element.The syntax of the value of the style attribute is determined by the default style sheet language.
- You will find more about this in the CSS learning on this site.
Attribute "title" value(s): text
- This attribute offers advisory information about the element for which it is set.
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>
Attribute "type" value(s): Look at each element for details. type information
- The attribute has different meanings depending on the element it is associated with. Sets the style of a list item.
Attribute value | description |
---|---|
1 | Decimal numbers: 1, 2, 3, 4, 5, ... (this is the default) |
a | Lowercase alphabetic: a, b, c, d, e, ... |
A | Uppercase alphabetic: A, B, C, D, E, ... |
i | Lowercase Roman numerals: i, ii, iii, iv, v, ... |
I | Uppercase Roman numerals: I, II, III, IV, V, ... |
Attribute "type" example:
<body bgcolor="#eeeeee">
<h2>White Varietals</h2>
<ol type='A'>
<li> Chardonnay</li>
<li>Chenin Blanc</li>
<li>Fumé Blanc</li>
<li>Gewürztraminer</li>
<li>Grüner Veltliner</li>
<li>Marsanne</li>
<li>Muscat</li>
<li>Pinot Blanc</li>
<li>Pinot Gris</li>
<li>Reisling</li>
<li>Sauvignon Blanc</li>
<li>Sémillon</li>
<li>Trebbiano</li>
<li>Viognie</li>
</ol>
</body>
Events:
onclick , ondblclick , onkeydown , onkeypress , onkeyup , onmousedown , onmousemove , onmouseout , onmouseover , onmouseup
Event "onclick" value(s): One or more script statements each ended with a semicolon.
Event "ondblclick" value(s): One or more script statements each ended with a semicolon.
Event "onkeydown" value(s): One or more script statements each ended with a semicolon.
Event "onkeypress" value(s): One or more script statements each ended with a semicolon.
Event "onkeyup" value(s): One or more script statements each ended with a semicolon.
Event "onmousedown" value(s): One or more script statements each ended with a semicolon.
Event "onmousemove" value(s): One or more script statements each ended with a semicolon.
Event "onmouseout" value(s): One or more script statements each ended with a semicolon.
Event "onmouseover" value(s): One or more script statements each ended with a semicolon.
Event "onmouseup" value(s): One or more script statements each ended with a semicolon.
onclick , ondblclick , onkeydown , onkeypress , onkeyup , onmousedown , onmousemove , onmouseout , onmouseover , onmouseup
Event "onclick" value(s): One or more script statements each ended with a semicolon.
- The onclick event occurs when the pointing device button is clicked over an element.
Attribute "onclick" example:
<html>
<head>
<title>onclick Event attribute</title>
</head>
<body bgcolor="Silver" text="Blue"
onclick="alert('you click on th body text')" >
The onclick event occurs when the pointing device
button is clicked over an element.
</body>
</html>
Event "ondblclick" value(s): One or more script statements each ended with a semicolon.
- The ondblclick event occurs when the pointing device button is double clicked over an element.
Attribute "ondblclick" example:
<html>
<head>
<title>ondblclick Event attribute</title>
</head>
<body bgcolor="Silver" text="Blue"
ondblclick="alert('you double-click on th body text')" >
The ondblclick event occurs when the pointing
device button is double clicked over an element.
</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.
Attribute "onmousedown" example:
<html>
<head>
<title>onmouseup Event attribute</title>
</head>
<body bgcolor="Silver" text="Blue"
onmouseup="alert('The mouse button is pressed down')" >
The onmouseup event occurs when the pointing
device button is released over an element.
</body>
</html>
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>
The ol element can contain the following element(s):
Elements | Description |
---|---|
li | This element defines a list item. |
The ol element can be contained in the following element(s):
Elements | Description |
---|---|
applet | (deprecated) This element is used to embed Java applets. |
blockquote | This element is used to format the text as a block quote, which means the right and left margins are indented from the text before and after the quote. |
body | 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. |
button | This element defines a submit button, reset button, or push button. |
center | (deprecated) This element defines a block whose contents are centered horizontally on visual browsers. |
dd | This element provides the definition of a term in a definition list. |
del | This element is used to markup sections of the document that have been deleted with respect to a different version of a document. |
div | This element offer a generic mechanism for adding structure to documents. # The <DIV> tag is used to divide a document up into artificial sections such as chapters, sections, appendix and so on. |
fieldset | Groups related form controls. |
form | This element defines an interactive form. |
iframe | This element defines an inline frame for the inclusion of other HTML documents. |
ins | This element is used to markup sections of the document that have been inserted with respect to a different version of a document. |
li | This element defines a list item. |
map | This element specifies a client-side image map that may be associated with another elements like: IMG, OBJECT, or INPUT. |
noscript | This element provides alternate content for a client-side script that was not executed. |
object | This element is used to include objects such as images, audio, videos, Java applets, and Flash animations. |
td | This element defines a data cell in a table. |
th | This element defines a header cell in a table. |
© 2010 by Finnesand Data.
All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the
correctness in the pages or source codes.
The risk of using this web-site pages or any program
codes from this website is entirely at the individual user.