HTML Links – Part 3
This is the last post regarding HTML Links.
The previous posts:
HTML Links – Part 2.
HTML Links – Part 1.
The Anchor tag <a>
Optional Attributes:
- charset=Character-set The Character Encoding of the document in the target URL.
- coords=Coordinates Coordinates used with an object or img element.
- href=URL The target URL of the link.
- hreflang=LanguageCode The language of the document in the target URL.
- name=BookmarkName Create a bookmark in a document.
- rel=Relationship The relation of the target URL to the current page.
- rev=Relationship The relation of the current page to the target URL.
- shape=Shape Defines the shape of a link.
- target=Target Specifies where the target URL will open.
- type=mimeType Specifies the MIME type (content type) of the target URL.
Standard Attributes:
accesskey, class, dir, id, lang, style, tabindex, title, xml:lang
Event Attributes:
onblur, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseover, onmouseup
cset
In the earlier days of the web ASCII was the default character-set. These days the default character-set for modern browsers is ISO-8859-1. Another common character-set is UTF-8 (Unicode).
Note: Remember a browser doesn’t understand all of the character-sets.
Syntax: <a cset="Character-set">
ISO Character-sets
| Character set | Description | Covers |
|---|---|---|
| ISO-8859-1 | Latin alphabet part 1 | North America, Western Europe, Latin America, the Caribbean, Canada, Africa |
| ISO-8859-2 | Latin alphabet part 2 | Eastern Europe |
| ISO-8859-3 | Latin alphabet part 3 | SE Europe, Esperanto, miscellaneous others |
| ISO-8859-4 | Latin alphabet part 4 | Scandinavia/Baltics (and others not in ISO-8859-1) |
| ISO-8859-5 | Latin/Cyrillic part 5 | The languages that are using a Cyrillic alphabet such as Bulgarian, Belarusian, Russian and Macedonian |
| ISO-8859-6 | Latin/Arabic part 6 | The languages that are using the Arabic alphabet |
| ISO-8859-7 | Latin/Greek part 7 | The modern Greek language as well as mathematical symbols derived from the Greek |
| ISO-8859-8 | Latin/Hebrew part 8 | The languages that are using the Hebrew alphabet |
| ISO-8859-9 | Latin 5 part 9 | The Turkish language. Same as ISO-8859-1 except Turkish characters replace Icelandic ones |
| ISO-8859-10 | Latin 6 Lappish, Nordic, Eskimo | The Nordic languages |
| ISO-8859-15 | Latin 9 (aka Latin 0) | Similar to ISO 8859-1 but replaces some less common symbols with the euro sign and some other missing characters |
| ISO-2022-JP | Latin/Japanese part 1 | The Japanese language |
| ISO-2022-JP-2 | Latin/Japanese part 2 | The Japanese language |
| ISO-2022-KR | Latin/Korean part 1 | The Korean language |
Unicode Character-Sets
| Character-set | Description |
|---|---|
| UTF-8 | A character in UTF8 can be from 1 to 4 bytes long. UTF-8 can represent any character in the Unicode standard. UTF-8 is backwards compatible with ASCII. UTF-8 is the preferred encoding for e-mail and web pages |
| UTF-16 | 16-bit Unicode Transformation Format is a variable-length character encoding for Unicode, capable of encoding the entire Unicode repertoire. UTF-16 is used in major operating systems and environments, like Microsoft Windows 2000/XP/2003/Vista/CE and the Java and .NET byte code environments |
coords
The coords attribute is used together with the shape attribute to specify the size, shape, and placement of a link in an object or img element. The coordinates of the top, left corner of an area are 0,0.
Note: Not supported in all browsers!!!
Syntax: <a coors="Coordinates,">
| Value | Description |
|---|---|
| x1,y1,x2,y2 | If the shape attribute is set to “rect”, you need to specify the coordinates of the left-top corner and the right-bottom corner of the rectangle. |
| x,y,radius | If the shape attribute is set to “circ”, you need to specify the coordinates of the circle center and the radius. |
| x1,y1,x2,y2,..,xn,yn | If the shape attribute is set to “poly”, you need to specify the coordinates of the edges of the polygon. If the first and last coordinate pairs are not the same, you need to specify the last coordinate pair to close the polygon. |
Syntax: <a href="URL,">
Have a look at the previous two posts: HTML Links – Part 1 and HTML Links – Part 2.
Back to Top
hreflang
A two-letter language code that specifies the language of the document in the target URL.
Syntax: <a hreflang="languageCode">
ISO 639-1 Language Codes
| Language | ISO Code |
|---|---|
| Abkhazian | ab |
| Afar | aa |
| Afrikaans | af |
| Albanian | sq |
| Amharic | am |
| Arabic | ar |
| Armenian | hy |
| Assamese | as |
| Aymara | ay |
| Azerbaijani | az |
| Bashkir | ba |
| Basque | eu |
| Bengali (Bangla) | bn |
| Bhutani | dz |
| Bihari | bh |
| Bislama | bi |
| Breton | br |
| Bulgarian | bg |
| Burmese | my |
| Byelorussian (Belarusian) | be |
| Cambodian | km |
| Catalan | ca |
| Chinese (Simplified) | zh |
| Chinese (Traditional) | zh |
| Corsican | co |
| Croatian | hr |
| Czech | cs |
| Danish | da |
| Dutch | nl |
| English | en |
| Esperanto | eo |
| Estonian | et |
| Faeroese | fo |
| Farsi | fa |
| Fiji | fj |
| Finnish | fi |
| French | fr |
| Frisian | fy |
| Galician | gl |
| Gaelic (Scottish) | gd |
| Gaelic (Manx) | gv |
| Georgian | ka |
| German | de |
| Greek | el |
| Greenlandic | kl |
| Guarani | gn |
| Gujarati | gu |
| Hausa | ha |
| Hebrew | he, iw |
| Hindi | hi |
| Hungarian | hu |
| Icelandic | is |
| Indonesian | id, in |
| Interlingua | ia |
| Interlingue | ie |
| Inuktitut | iu |
| Inupiak | ik |
| Irish | ga |
| Italian | it |
| Japanese | ja |
| Javanese | jv |
| Kannada | kn |
| Kashmiri | ks |
| Kazakh | kk |
| Kinyarwanda (Ruanda) | rw |
| Kirghiz | ky |
| Kirundi (Rundi) | rn |
| Korean | ko |
| Kurdish | ku |
| Laothian | lo |
| Latin | la |
| Latvian (Lettish) | lv |
| Limburgish ( Limburger) | li |
| Lingala | ln |
| Lithuanian | lt |
| Macedonian | mk |
| Malagasy | mg |
| Malay | ms |
| Malayalam | ml |
| Maltese | mt |
| Maori | mi |
| Marathi | mr |
| Moldavian | mo |
| Mongolian | mn |
| Nauru | na |
| Nepali | ne |
| Norwegian | no |
| Occitan | oc |
| Oriya | or |
| Oromo (Afan, Galla) | om |
| Pashto (Pushto) | ps |
| Polish | pl |
| Portuguese | pt |
| Punjabi | pa |
| Quechua | qu |
| Rhaeto-Romance | rm |
| Romanian | ro |
| Russian | ru |
| Samoan | sm |
| Sangro | sg |
| Sanskrit | sa |
| Serbian | sr |
| Serbo-Croatian | sh |
| Sesotho | st |
| Setswana | tn |
| Shona | sn |
| Sindhi | sd |
| Sinhalese | si |
| Siswati | ss |
| Slovak | sk |
| Slovenian | sl |
| Somali | so |
| Spanish | es |
| Sundanese | su |
| Swahili (Kiswahili) | sw |
| Swedish | sv |
| Tagalog | tl |
| Tajik | tg |
| Tamil | ta |
| Tatar | tt |
| Telugu | te |
| Thai | th |
| Tibetan | bo |
| Tigrinya | ti |
| Tonga | to |
| Tsonga | ts |
| Turkish | tr |
| Turkmen | tk |
| Twi | tw |
| Uighur | ug |
| Ukrainian | uk |
| Urdu | ur |
| Uzbek | uz |
| Vietnamese | vi |
| Volapük | vo |
| Welsh | cy |
| Wolof | wo |
| Xhosa | xh |
| Yiddish | yi, ji |
| Yoruba | yo |
| Zulu | zu |
name
Create a bookmark in a document.
Syntax: <a name="name">
Was discussed in HTML Links – Part 1.
Back to Top
rel
The relation of the target URL to the current page.
Syntax: <a rel="relationship">
| Value | Description |
|---|---|
| alternate | An alternate version of the document e.g. translated, mirror, etc. |
| appendix | An appendix of a selection of documents. |
| bookmark | A related document. |
| chapter | A chapter of a selection of documents. |
| contents | A table of contents for the document. |
| copyright | A document containing copyright information. |
| glossary | A glossary (explanation) of words used in the document. |
| help | A help document. |
| index | An index for the document. |
| next | The next document in the current selection. |
| prev | The previous document in the current selection. |
| section | A section of a selection of documents. |
| start | The first document in a selection. |
| stylesheet | An external style sheet for the document. |
| subsection | A subsection of a selection of documents. |
rev
The relation of the current page to the target URL. This is the opposite of the rel attribute.
Syntax: <a rev="relationship">
| Value | Description |
|---|---|
| alternate | An alternate version of the document e.g. translated, mirror, etc. |
| appendix | An appendix of a selection of documents. |
| bookmark | A related document. |
| chapter | A chapter of a selection of documents. |
| contents | A table of contents for the document. |
| copyright | A document containing copyright information. |
| glossary | A glossary (explanation) of words used in the document. |
| help | A help document. |
| index | An index for the document. |
| next | The next document in the current selection. |
| prev | The previous document in the current selection. |
| section | A section of a selection of documents. |
| start | The first document in a selection. |
| stylesheet | An external style sheet for the document. |
| subsection | A subsection of a selection of documents. |
shape
Syntax: <a shape="link-shape">
| Value | Description |
|---|---|
| default | Specifies the entire region. |
| rect | Defines a rectangular region. |
| circle | Defines a circular region. |
| poly | Defines a polygonal region. |
target
Syntax: <a target="target">
Was discussed in HTML Links – Part 1.
| Value | Description |
|---|---|
| _blank | Target URL opens in a new window |
| _self | Target URL will open in the same frame as it was clicked. |
| _parent | Target URL will open in the parent frameset. |
| _top | Target URL will open in the full body of the window. |
| framename | Name of the target frame the URL should open in. |
| _tab | Target URL will open in a new tab page if the browser supports it, otherwise in a new window. |
type
Specifies the content type of the target URL.
Syntax: <a type="mimeType">
A commonly used example is: <a type="text/html">
A list of registered content types can be find here.
Note to Facebook Note Readers: Facebook Notes is not supporting tables, rather view the original post.
This was the last part of HTML Links.
-
Archives
- December 2009 (5)
- November 2009 (11)
- October 2009 (9)
- September 2009 (9)
- August 2009 (12)
- July 2009 (9)
- June 2009 (5)
- May 2009 (16)
- April 2009 (20)
- March 2009 (27)
- February 2009 (6)
-
Categories
-
RSS
Entries RSS
Comments RSS

