HTML: Body Tag

Author: Ronald S. Holland
at
Total Application Works




To contact us



HOME] Consulting Design Maintenance Project Testing Training Turnkey Java C++ SQL HTML JavaScript ]

© 2002 - 2013 All Rights Reserved Total Application Works


    Tell a friend about this site (copy and paste the following HTML page into a file (e.g., using Notepad).)
    <html>
    <head>
    <title>Example of a link </title>
    </head>
    <body>
    <a href="http://sumtotalz.com/TotalAppsWorks/HTML/BODY.html">
    Anchor Tag </a>
    </table>
    </body>
    </html>


Introduction

The purpose of this tutorial is to show you how to write a HTML page using the BODY tag. What is HTML (HyperText Markup Language)? HTML is a layout/tag language that is used to organize text and/or images on a web page. In the following example, we will show you the code for our page examples that use the BODY tag. The <BODY> tag allows the user to include content, such as text, hyperlinks, images, tables, lists, etc., on a web page. For example a basic web page containing a <BODY> might look like this:

Code Displayed in your browser
 
<html>
<head>
<title>The is a basic web page
</title
<style type="text/css"> h3.head_3 {color:blue;} p.basic {color:red;} p.basic_2 {color:green;} </style>
</head> <body> <h3> class="head_3">Header 3</h3> <p class="basic">A paragraph. </p> <p class="basic_2">I am building a basic web page to demonstrate how it is done.</p> </body> </html>

Header 3

A paragraph.

I am building a basic web page to demonstrate how it is done.

Figure 1: Basic web page with BODY tag


In the above Figure 1,

  1. <HTML - is the start of your HTML web page.
  2. <HEAD> - the HEAD section contains information about the document, which is communicated through the TITLE and META tags.
  3. <TITLE> - is the title of your web page.
  4. </TITLE> - ends the title content of your web page.
  5. </HEAD> - ends the HEAD section of your web page.
  6. <BODY> - is the start of your HTML web page content.
  7. <H3> - is the start of a heading.
  8. </H3> - is the end of a heading.
  9. <P> - is the start of a paragraph.
  10. </P - is the end of a paragraph.
  11. </BODY> - is the end of your HTML web page content.
  12. </HTML> - is the end of your HTML web page.

Optional Body Attributes

Attribute Attribute Description
alink rgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the color of an active link in a document
background URL Deprecated. Use styles instead.
Specifies a background image for a document
bgcolor rgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the background color of a document
link rgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the default color of unvisited links in a document
text rgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the color of the text in a document
rgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the color of the visited links in a document

Standard Attributes

The <body> tag supports the following standard attributes:

Attribute Value Description
class classname Specifies a classname for an element
dir rtl
ltr
Specifies the text direction for the content in an element
id id Specifies a unique id for an element
lang language_code Excluding computer languages, the lang attribute's value is a language code that identifies a natural language spoken, written, or otherwise used for the communication of information among people. Some examples are:
  • en - English
  • en-US - the U.S. version of English.
  • en-cockney - the Cockney version of English.
  • i-navajo - the Navajo language spoken by some Native Americans.
An example of the lang on the <body> tag is:
<body lang=en>
style style_definition Specifies an inline style for an element
title text Specifies extra information about an element and defines the title of the document. The title element is required in all HTML/XHTML documents. And example of its use is:

<title>This is the title of my web page </title>
xml:lang language_code Specifies a language code for the content in an element, in XHTML documents

Event Attributes

The <body> tag supports the following event attributes:

Attribute Value Description
onclick script Script to be run on a mouse click
ondblclick script Script to be run on a mouse double-click
onload script Script to be run when a document load
onmousedown script Script to be run when mouse button is pressed
onmousemove script Script to be run when mouse pointer moves
onmouseout script Script to be run when mouse pointer moves out of an element
onmouseover script Script to be run when mouse pointer moves over an element
onmouseup script Script to be run when mouse button is released
onkeydown script Script to be run when a key is pressed
onkeypress script Script to be run when a key is pressed and released
onkeyup script Script to be run when a key is released
onunload script Script to be run when a document unload




You can be use the <a> tag in two ways by:
  1. Using the href attribute to create a link to another document, or
  2. Creating a bookmark inside a document, by using the name attribute
In the following figure, we will show an example of how to create a link to another web page.

Source Code Displayed by your Browser
<a href="http://sumtotalz.com/TotalAppsWorks/HTML/HTML_TOC.html">HTML Resources</a> HTML Resources

Click on HTML Resources above
Figure 1: Link to another Web Pgae Example


In the above Figure 1;
  1. <a> - is the start of an BODY tag that allows the user to link to another web page or another section within the same web page'
  2. href - the href attribute specifies the link's destination;
  3. </a> - is the end of an BODY tag.

Language Codes: ISO 639, Microsoft:

Language ISO Code Windows Name Win Code
Abkhazian ab    
Afar aa    
Afrikaans af LANG_AFRIKAANS 0x36
Albanian sq LANG_ALBANIAN 0x1c
Amharic am (no constant defined) 0x5e
Arabic ar LANG_ARABIC 0x01
Armenian hy LANG_ARMENIAN 0x2b
Assamese as LANG_ASSAMESE 0x4d
Aymara ay    
Azerbaijani az LANG_AZERI 0x2c
Bashkir ba    
Basque eu LANG_BASQUE 0x2d
Bengali (Bangla) bn LANG_BENGALI 0x45
Bhutani dz    
Bihari bh    
Bislama bi    
Breton br    
Bulgarian bg LANG_BULGARIAN 0x02
Burmese my (no constant defined) 0x55
Byelorussian (Belarusian) be LANG_BELARUSIAN 0x23
Cambodian km (no constant defined) 0x53
Catalan ca LANG_CATALAN 0x03
Cherokee   (no constant defined) 0x5c
Chewa      
Chinese (Simplified) zh LANG_CHINESE (SUBLANG_CHINESE_SIMPLIFIED) 0x04 (0x0804)
Chinese (Traditional) zh LANG_CHINESE (SUBLANG_CHINESE_TRADITIONAL) 0x04 (0x0404)
Corsican co    
Croatian hr LANG_CROATIAN 0x1a
Czech cs LANG_CZECH 0x05
Danish da LANG_DANISH 0x06
Divehi   LANG_DIVEHI 0x65
Dutch nl LANG_DUTCH 0x13
Edo   (no constant defined) 0x66
English en LANG_ENGLISH 0x09
Esperanto eo    
Estonian et LANG_ESTONIAN 0x25
Faeroese fo LANG_FAEROESE 0x38
Farsi fa LANG_FARSI 0x29
Fiji fj    
Finnish fi LANG_FINNISH 0x0b
Flemish   LANG_DUTCH (SUBLANG_DUTCH_BELGIAN) 0x13 (0x0813)
French fr LANG_FRENCH 0x0c
Frisian fy (no constant defined) 0x62
Fulfulde   (no constant defined) 0x67
Galician gl LANG_GALICIAN 0x56
Gaelic (Scottish) gd (no constant defined) 0x3c (0x043c)
Gaelic (Manx) gv    
Georgian ka LANG_GEORGIAN 0x37
German de LANG_GERMAN 0x07
Greek el LANG_GREEK 0x08
Greenlandic kl    
Guarani gn (no constant defined) 0x74
Gujarati gu LANG_GUJARATI 0x47
Hausa ha (no constant defined) 0x68
Hawaiian   (no constant defined) 0x75
Hebrew he, iw* LANG_HEBREW 0x0d
Hindi hi LANG_HINDI 0x39
Hungarian hu LANG_HUNGARIAN 0x0e
Ibibio   (no constant defined) 0x69
Icelandic is LANG_ICELANDIC 0x0f
Igbo   (no constant defined) 0x70
Indonesian id, in* LANG_INDONESIAN 0x21
Interlingua ia    
Interlingue ie    
Inuktitut iu (no constant defined) 0x5d
Inupiak ik    
Irish ga (no constant defined) 0x3c (0x083c)
Italian it LANG_ITALIAN 0x10
Japanese ja LANG_JAPANESE 0x11
Javanese jv    
Kannada kn LANG_KANNADA 0x4b
Kanuri   (no constant defined) 0x71
Kashmiri ks LANG_KASHMIRI 0x60
Kazakh kk LANG_KAZAK 0x3f
Kinyarwanda (Ruanda) rw    
Kirghiz ky LANG_KYRGYZ 0x40
Kirundi (Rundi) rn    
Konkani   LANG_KONKANI 0x57
Korean ko LANG_KOREAN 0x12
Kurdish ku    
Laothian lo (no constant defined) 0x54
Latin la (no constant defined) 0x76
Latvian (Lettish) lv LANG_LATVIAN 0x26
Limburgish ( Limburger) li    
Lingala ln    
Lithuanian lt LANG_LITHUANIAN 0x27
Macedonian mk LANG_MACEDONIAN 0x2f
Malagasy mg    
Malay ms LANG_MALAY 0x3e
Malayalam ml LANG_MALAYALAM 0x4c
    LANG_MANIPURI 0x58
Maltese mt (no constant defined) 0x3a
Maori mi    
Marathi mr LANG_MARATHI 0x4e
Moldavian mo    
Mongolian mn LANG_MONGOLIAN 0x50
Nauru na    
Nepali ne LANG_NEPALI 0x61
Norwegian no LANG_NORWEGIAN 0x14
Occitan oc    
Oriya or LANG_ORIYA 0x48
Oromo (Afan, Galla) om (no constant defined) 0x72
Papiamentu   (no constant defined) 0x79
Pashto (Pushto) ps (no constant defined) 0x63
Polish pl LANG_POLISH 0x15
Portuguese pt LANG_PORTUGUESE 0x16
Punjabi pa LANG_PUNJABI 0x46
Quechua qu    
Rhaeto-Romance rm (no constant defined) 0x17
Romanian ro LANG_ROMANIAN 0x18
Russian ru LANG_RUSSIAN 0x19
Sami (Lappish)   (no constant defined) 0x3b
Samoan sm    
Sangro sg    
Sanskrit sa LANG_SANSKRIT 0x4f
Serbian sr LANG_SERBIAN (SUBLANG_SERBIAN_LATIN or SUBLANG_SERBIAN_CYRILLIC) 0x1a (0x081a or 0x0c1a)
Serbo-Croatian sh    
Sesotho st    
Setswana tn    
Shona sn    
Sindhi sd LANG_SINDHI 0x59
Sinhalese si (no constant defined) 0x5b
Siswati ss    
Slovak sk LANG_SLOVAK 0x1b
Slovenian sl LANG_SLOVENIAN 0x24
Somali so (no constant defined) 0x77
Spanish es LANG_SPANISH 0x0a
Sundanese su    
Swahili (Kiswahili) sw LANG_SWAHILI 0x41
Swedish sv LANG_SWEDISH 0x1d
Syriac   LANG_SYRIAC 0x5a
Tagalog tl (no constant defined) 0x64
Tajik tg (no constant defined) 0x28
Tamazight   (no constant defined) 0x5f
Tamil ta LANG_TAMIL 0x49
Tatar tt LANG_TATAR 0x44
Telugu te LANG_TELUGU 0x4a
Thai th LANG_THAI 0x1e
Tibetan bo (no constant defined) 0x51
Tigrinya ti (no constant defined) 0x73
Tonga to    
Tsonga ts (no constant defined) 0x31
Turkish tr LANG_TURKISH 0x1f
Turkmen tk (no constant defined) 0x42
Twi tw    
Uighur ug    
Ukrainian uk LANG_UKRAINIAN 0x22
Urdu ur LANG_URDU 0x20
Uzbek uz LANG_UZBEK 0x43
Venda   (no constant defined) 0x33
Vietnamese vi LANG_VIETNAMESE 0x2a
Volap?k vo    
Welsh cy (no constant defined) 0x52
Wolof wo    
Xhosa xh (no constant defined) 0x34
Yi   (no constant defined) 0x78
Yiddish yi, ji* (no constant defined) 0x3d
Yoruba yo (no constant defined) 0x6a
Zulu zu (no constant defined) 0x35 

Language Codes: ISO 639, Macintosh:

Language ISO Code Mac Name Mac Code
Abkhazian ab    
Afar aa    
Afrikaans af langAfricaans 141
Albanian sq langAlbanian 36
Amharic am langAmharic 85
Arabic ar langArabic 12
Armenian hy langArmenian 51
Assamese as langAssamese 68
Aymara ay langAymara 134
Azerbaijani az langAzerbaijani(Cyrllic), langAzerbaijanAr(Arabic) 49(C), 50(A)
Bashkir ba    
Basque eu langBasque 129
Bengali (Bangla) bn langBengali 67
Bhutani dz langDzongkha 137
Bihari bh    
Bislama bi    
Breton br langBreton 142
Bulgarian bg langBulgarian 44
Burmese my langBurmese 77
Byelorussian (Belarusian) be langByelorussian 46
Cambodian km langKhmer 78
Catalan ca langCatalan 130
Cherokee      
Chewa   langChewa 92
Chinese (Simplified) zh langSimpChinese 33
Chinese (Traditional) zh langTradChinese 19
Corsican co    
Croatian hr langCroatian 18
Czech cs langCzech 38
Danish da langDanish 7
Divehi      
Dutch nl langDutch 4
Edo      
English en langEnglish 0
Esperanto eo langEsperanto 94
Estonian et langEstonian 27
Faeroese fo langFaeroese 30
Farsi fa langFarsi, langPersian 31
Fiji fj    
Finnish fi langFinnish 13
Flemish   langFlemish 34
French fr langFrench 1
Frisian fy    
Fulfulde      
Galician gl langGalician 140
Gaelic (Scottish) gd langScottishGaelic 144
Gaelic (Manx) gv langManxGaelic 145
Georgian ka langGeorgian 52
German de langGerman 2
Greek el langGreek (monotonic), langGreekPoly (polytonic) 14(m), 148(p)
Greenlandic kl    
Guarani gn langGuarani 133
Gujarati gu langGujarati 69
Hausa ha    
Hawaiian      
Hebrew he, iw* langHebrew 10
Hindi hi langHindi 21
Hungarian hu langHungarian 26
Ibibio      
Icelandic is langIcelandic 15
Igbo      
Indonesian id, in* langIndonesian 81
Interlingua ia    
Interlingue ie    
Inuktitut iu langInuktitut 143
Inupiak ik    
Irish ga langIrishGaelic (normal), langIrishGaelicScr (dots above) 35, 146
Italian it langItalian 3
Japanese ja langJapanese 11
Javanese jv langJavaneseRom 138
Kannada kn langKannada 73
Kanuri      
Kashmiri ks langKashmiri 61
Kazakh kk langKazakh 48
Kinyarwanda (Ruanda) rw langKiryarwanda (langRuanda) 90
Kirghiz ky langKirghiz 54
Kirundi (Rundi) rn langRundi 91
Konkani      
Korean ko langKorean 23
Kurdish ku langKurdish 60
Laothian lo langLao 79
Latin la langLatin 131
Latvian (Lettish) lv langLatvian 28
Limburgish ( Limburger) li    
Lingala ln    
Lithuanian lt langLithuanian 24
Macedonian mk langMacedonian 43
Malagasy mg langMalagasy 93
Malay ms langMalayRoman(Latin), langMalayArabic(Arabic) 83(L), 84(A)
Malayalam ml langMalayalam 72
       
Maltese mt langMaltese 16
Maori mi    
Marathi mr langMarathi 66
Moldavian mo langMoldavian 53
Mongolian mn langMongolian(Mongolian), langMongolianCyr(Cyrillic) 57(M), 58(C)
Nauru na    
Nepali ne langNepali 64
Norwegian no langNorwegian 9
Occitan oc    
Oriya or langOriya 71
Oromo (Afan, Galla) om langOromo (langGalla) 87
Papiamentu      
Pashto (Pushto) ps langPashto 59
Polish pl langPolish 25
Portuguese pt langPortuguese 8
Punjabi pa langPunjabi 70
Quechua qu langQuechua 132
Rhaeto-Romance rm    
Romanian ro langRomanian 37
Russian ru langRussian 32
Sami (Lappish)   langSami (langLappish) 29
Samoan sm    
Sangro sg    
Sanskrit sa langSanskrit 65
Serbian sr langSerbian 42
Serbo-Croatian sh    
Sesotho st    
Setswana tn    
Shona sn    
Sindhi sd langSindhi 62
Sinhalese si langSinhalese 76
Siswati ss    
Slovak sk langSlovak 39
Slovenian sl langSlovenian 40
Somali so langSomali 88
Spanish es langSpanish 6
Sundanese su langSundaneseRom 139
Swahili (Kiswahili) sw langSwahili 89
Swedish sv langSwedish 5
Syriac      
Tagalog tl langTagalog 82
Tajik tg langTajiki 55
Tamazight      
Tamil ta langTamil 74
Tatar tt langTatar 135
Telugu te langTelugu 75
Thai th langThai 22
Tibetan bo langTibetan 63
Tigrinya ti langTigrinya 86
Tonga to langTongan 147
Tsonga ts    
Turkish tr langTurkish 17
Turkmen tk langTurkmen 56
Twi tw    
Uighur ug langUighur 136
Ukrainian uk langUkrainian 45
Urdu ur langUrdu 20
Uzbek uz langUzbek 47
Venda      
Vietnamese vi langVietnamese 80
Volap?k vo    
Welsh cy langWelsh 128
Wolof wo    
Xhosa xh    
Yi      
Yiddish yi, ji* langYiddish 41
Yoruba yo    
Zulu zu    

Definitions

deprecated










HOME] Consulting Design Maintenance Project Testing Training Turnkey Java C++ SQL HTML JavaScript ]


To contact us

© 2002 - 2013 All Rights Reserved Total Application Works