HTML Element Reference
Form Elements
Formating Elements
Frame Elements
Head Elements
Image and Media Elements
List Elements
Structure Elements
Table Elements
|
The HTML Elements reference.
"link" - html element
- This element is designed to define a relationship between documents.
- Starttag <link> is Required and endtag </link> is forbidden
- It should placed inside the header section ('head' ).
- You may have as many elements as you desire.
-
Browsers that support the link - element :
Attributes:
charset , class , dir , href , hreflang , id , lang , media , rel , rev , style , target , title , type
Attribute "charset" value(s): charset
Attribute "class" value(s): A list of style class names that must be separated by white space characters.
Attribute "dir" value(s): ltr or rtl
Attribute "href" value(s): uri uri
Attribute "hreflang" value(s): language code
Attribute "id" value(s): unique name
Attribute "lang" value(s): language-code
Attribute "media" value(s): sequence of characters
Attribute "rel" value(s): link types
Attribute "rev" value(s): link types
Attribute "style" value(s): style
Attribute "target" value(s): frame target
Attribute "title" value(s): text
Attribute "type" value(s): Look at each element for details. content type
charset , class , dir , href , hreflang , id , lang , media , rel , rev , style , target , title , type
Attribute "charset" value(s): charset
- Specifies the character encoding of the resource designated by the link.
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 "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 "href" value(s): uri uri
- Specifies the location of a Web resource, thus defining a link between the current element (the source anchor) and the destination anchor defined by this attribute.
Attribute "href" example:
<!--
The CSS file print.css contain:
body { font-size: 10pt }
The CSS file screen.cc contain:
body { font-size: 18pt }
-->
<html>
<head>
<title>Tempest Links</title>
<link rel="stylesheet" type="text/css" media="print"
href="print.css"/>
<link rel="stylesheet" type="text/css" media="screen"
href="screen.css"/>
</head>
<body>
The type attribute specifies the MIME type of the linked document.
Gives an advisory hint as to the content type of
the content available at the link target address.
On screen the text is in 18pt.
Right click this and select print.
The printed text is in 10pt.
</body>
</html>
Attribute "hreflang" value(s): language code
- Specifies the base language of the resource designated by href and may only be used when href is specified.
- Language codes are case-insensitive.
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 "media" value(s): sequence of characters
- For rendering on these media
Attribute value | description |
---|---|
screen | Intended for non-paged computer screens. |
tty | Intended for media using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities. |
tv | Intended for television-type devices (low resolution, color, limited scrollability). |
projection | Intended for projectors. |
handheld | Intended for handheld devices (small screen, monochrome, bitmapped graphics, limited bandwidth). |
Intended for paged, opaque material and for documents viewed on screen in print preview mode. | |
braille | Intended for braille tactile feedback devices. |
aural | Intended for speech synthesizers. |
all | Suitable for all devices. |
Attribute "media" example:
<!--
The CSS file print.css contain:
body { font-size: 10pt }
The CSS file screen.cc contain:
body { font-size: 18pt }
-->
<html>
<head>
<title>Tempest Links</title>
<link rel="stylesheet" type="text/css" media="print"
href="print.css"/>
<link rel="stylesheet" type="text/css" media="screen"
href="screen.css"/>
</head>
<body>
The type attribute specifies the MIME type of the linked document.
Gives an advisory hint as to the content type of
the content available at the link target address.
On screen the text is in 18pt.
Right click this and select print.
The printed text is in 10pt.
</body>
</html>
Attribute "rel" value(s): link types
- Describes the relationship from the current document to the anchor specified by the href attribute.
- The value of this attribute is a space-separated list of link types.
Attribute value | description |
---|---|
Alternate | Designates substitute versions for the document in which the link occurs. When used together with the lang attribute, it implies a translated version of the document. When used together with the media attribute, it implies a version designed for a different medium (or media). |
Stylesheet | Refers to an external style sheet. See the section on external style sheets for details. This is used together with the link type "Alternate" for user-selectable alternate style sheets. |
Start | Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection. |
Next | Refers to the next document in a linear sequence of documents. User agents may choose to preload the "next" document, to reduce the perceived load time. |
Prev | Refers to the previous document in an ordered series of documents. Some user agents also support the synonym "Previous". |
Contents | Refers to a document serving as a table of contents. Some user agents also support the synonym ToC (from "Table of Contents"). |
Index | Refers to a document providing an index for the current document. |
Glossary | Refers to a document providing a glossary of terms that pertain to the current document. |
Copyright | Refers to a copyright statement for the current document. |
Chapter | Refers to a document serving as a chapter in a collection of documents. |
Section | Refers to a document serving as a section in a collection of documents. |
Subsection | Refers to a document serving as a subsection in a collection of documents. |
Appendix | Refers to a document serving as an appendix in a collection of documents. |
Help | Refers to a document offering help (more information, links to other sources information, etc.) |
Bookmark | Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined in each document. |
Attribute "rel" example:
<!--
The CSS file print.css contain:
body { font-size: 10pt }
The CSS file screen.cc contain:
body { font-size: 18pt }
-->
<html>
<head>
<title>Tempest Links</title>
<link rel="stylesheet" type="text/css" media="print"
href="print.css"/>
<link rel="stylesheet" type="text/css" media="screen"
href="screen.css"/>
</head>
<body>
The type attribute specifies the MIME type of the linked document.
Gives an advisory hint as to the content type of
the content available at the link target address.
On screen the text is in 18pt.
Right click this and select print.
The printed text is in 10pt.
</body>
</html>
Attribute "rev" value(s): link types
- Used to describe a reverse link from the anchor specified by the href attribute to the current document.
- The value of this attribute is a space-separated list of link types
Attribute value | description |
---|---|
Alternate | Designates substitute versions for the document in which the link occurs. When used together with the lang attribute, it implies a translated version of the document. When used together with the media attribute, it implies a version designed for a different medium (or media). |
Stylesheet | Refers to an external style sheet. See the section on external style sheets for details. This is used together with the link type "Alternate" for user-selectable alternate style sheets. |
Start | Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection. |
Next | Refers to the next document in a linear sequence of documents. User agents may choose to preload the "next" document, to reduce the perceived load time. |
Prev | Refers to the previous document in an ordered series of documents. Some user agents also support the synonym "Previous". |
Contents | Refers to a document serving as a table of contents. Some user agents also support the synonym ToC (from "Table of Contents"). |
Index | Refers to a document providing an index for the current document. |
Glossary | Refers to a document providing a glossary of terms that pertain to the current document. |
Copyright | Refers to a copyright statement for the current document. |
Chapter | Refers to a document serving as a chapter in a collection of documents. |
Section | Refers to a document serving as a section in a collection of documents. |
Subsection | Refers to a document serving as a subsection in a collection of documents. |
Appendix | Refers to a document serving as an appendix in a collection of documents. |
Help | Refers to a document offering help (more information, links to other sources information, etc.) |
Bookmark | Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined in each document. |
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 "target" value(s): frame target
- Specifies the name of a frame where a document is to be opened. Look in the table below for other alternatives.
- The TARGET attribute value ( in the table below) is case-insensitive, so that _top and _TOP both have the same meaning.
Attribute value | description |
---|---|
{frame name} | Renders the links to a frame or iframe. |
_blank | Renders the links in a new, unnamed window. |
_self | Renders the links in the current frame. |
_parent | Renders the links in the immediate FRAMESET parent. |
_top | Renders the links in the full, unframed window. |
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. content type
- The attribute has different meanings depending on the element it is associated with. The type attribute specifies the MIME type of the linked document. Gives an advisory hint as to the content type of the content available at the link target address. A space-separated list of link types.
- You should look at IANA MIME types for more details of standard defined types. White space characters are not permitted within link types.
Attribute value | description |
---|---|
text/html | Describes a text document containing html. |
text/css | Describes a text document containing style sheet. |
text/javascript | Describes a text document containing javascript. |
text/vbscript | Describes a text document containing vbscript. |
text/plain | Describes a text document containing plain text. |
multipart/form-data | Describes document containing multipart formdata. |
Attribute "type" example:
<!--
The CSS file print.css contain:
body { font-size: 10pt }
The CSS file screen.cc contain:
body { font-size: 18pt }
-->
<html>
<head>
<title>Tempest Links</title>
<link rel="stylesheet" type="text/css" media="print"
href="print.css"/>
<link rel="stylesheet" type="text/css" media="screen"
href="screen.css"/>
</head>
<body>
The type attribute specifies the MIME type of the linked document.
Gives an advisory hint as to the content type of
the content available at the link target address.
On screen the text is in 18pt.
Right click this and select print.
The printed text is in 10pt.
</body>
</html>
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 link element cannot contain any element!
The link element can be contained in the following element(s):
Elements | Description |
---|---|
head | This element contains information about the current document, such as its title, keywords that may be useful to search engines, and other data that is not considered document content. |
© 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.