<HTML> Element and Head & Body

] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ]

<HTML> Element

  • Every HTML document consists of <HTML>…</HTML>.
  • The tag can be written in either <HTML>, <html> or <HtMl>.

 

Head & Body

 Head = <HEAD>…</HEAD>

  • A lot of elements can be put inside the <HEAD> element, for example, <TITLE>, <META> and <LINK>.

 

Title = <TITLE>…</TITLE>

    • A document may have only one title.
    • The <TITLE> element signifies what the page is about.
    • Use a descriptive but succinct title for each page.
    • Keep title short !
    • Do not place any markup tags in title.

X <TITLE><H1>My Web Page</H1></TITLE>

 

Body = <BODY>…</BODY>

  • The <BODY> element follows the <HEAD> section.
  • What you type inside these tags is what you want other people to view.

 

Document Background

To create the document background, there are two interesting ways:

- Use image as a background. <BODY BACKGROUND=graphic file>

- Use attribute to body <BODY BGCOLOR=color code>

<BODY BGCOLOR=color name>

 

Text Color

- This command is used to control the color of all the normal text in the document.

- The format of text is the same as BGCOLOR.<BODY TEXT=color code> or <BODY TEXT=color name>

Color Table (some examples)

#FFFF

(White)

#FF0000

(Red)

#00FF00

(Green)

#0000FF

(Blue)

#FF00FF

(Magenta)

#00FFFF

(Cyan)

#FFFF00

(Yellow)

#000000

(Black)

#70DB93

(Aquamarine)

#5C3317

(Baker's Chocolate)

#9F5F9F

(Blue Violet)

#B5A642

(Brass)

#D9D919

(Bright Gold)

#A62A2A

(Brown)

#8C7853

(Bronze)

#B87333

(Copper)

#FF7F00

(Coral)

#42426F

(Cornflower Blue)

#5C4033

(Dark Brown)

#2F4F2F

(Dark green)

#9932CD

(Dark Orchid)

#871F78

(Dark Purple)

#97694F

(Dark Tan)

#545454

(Dim Gray)

#856363

(Dusty Rose)

#D19275

(Feldspar)

#8E2323

(Firebrick)

#CD7F32

(Gold)

#C0C0C0

(Gray)

#4E2F2F

(Indian Red)

#9F9F5F

(Khaki)

#C0D9D9

(Light Blue)

#A8A8A8

(Light Gray)

#32CD32

(Lime Green)

#E47833

(Mandarin Orange)

#8E236B

(Maroon)

#23238E

(Navy Blue)

#4D4DFF

(Neon Blue)

#FF6EC7

(Neon Pink)

#FF7F00

(Orange)

#FF2400

(Orange Red)

#DB70DB

(Orchid)

#8FBC8F

(Pale Green)

#BC8F8F

(Pink)

#EAADEA

(Plum)

#D9D9F3

(Quartz)

#5959AB

(Rich Blue)

#6F4242

(Salmon)

#8C1717

(Scarlet)

#238E68

(Sea Green)

#6B4226

(Semi-Sweet Choc.)

#8E6B23

(Sienna)

#E6E8FA

(Silver)

#3299CC

(Sky Blue)

#007FFF

(Slate Blue)

#FF1CAE

(Spicy Pink)

#236B8E

(Steel Blue)

#38B0DE

(Summer Sky)

#DB9370

(Tan)

#D8BFD8

(Thistle)

#ADEAEA

(Turquoise)

#4F2F4F

(Violet)

#CC3299

(Violet Red)

#D8D8BF

(Wheat)

#99CC32

(Yellow Green)

#CDCDCD

(Very Light Gray)

 

Previous | HTML Page | Next