Tag

Description

NN

IE

<!--...-->

Defines a comment

3.0

3.0

<!DOCTYPE> 

Defines the document type

 

 

<a>

Defines an anchor

3.0

3.0

<abbr>

Defines an abbreviation

6.2

 

<acronym>

Defines an acronym

6.2

4.0

<address>

Defines an address element

4.0

4.0

<applet>

Deprecated. Defines an applet

3.0

3.0

<area>

Defines an area inside an image map

3.0

3.0

<b>

Defines bold text

3.0

3.0

<base>

Defines a base URL for all the links in a page

3.0

3.0

<basefont>

Deprecated. Defines a base font

3.0

3.0

<bdo>

Defines the direction of text display

6.2

5.0

<big>

Defines big text

3.0

3.0

<blockquote>

Defines a long quotation

3.0

3.0

<body>

Defines the body element

3.0

3.0

<br>

Inserts a single line break

3.0

3.0

<button>

Defines a push button

6.2

4.0

<caption>

Defines a table caption

3.0

3.0

<center>

Deprecated. Defines centered text

3.0

3.0

<cite>

Defines a citation

3.0

3.0

<code>

Defines computer code text

3.0

3.0

<col>

Defines attributes for table columns 

 

3.0

<colgroup>

Defines groups of table columns

 

3.0

<dd>

Defines a definition description

3.0

3.0

<del>

Defines deleted text

6.2

4.0

<dir>

Deprecated. Defines a directory list

3.0

3.0

<dfn>

Defines a definition term

 

3.0

<div>

Defines a section in a document

3.0

3.0

<dl>

Defines a definition list

3.0

3.0

<dt>

Defines a definition term

3.0

3.0

<em>

Defines emphasized text 

3.0

3.0

<fieldset>

Defines a fieldset

6.2

4.0

<font>

Deprecated. Defines the font face, size, and color of text

3.0

3.0

<form>

Defines a form 

3.0

3.0

<frame>

Defines a sub window (a frame)

3.0

3.0

<frameset>

Defines a set of frames

3.0

3.0

<h1> to <h6>

Defines header 1 to header 6

3.0

3.0

<head>

Defines information about the document

3.0

3.0

<hr>

Defines a horizontal rule

3.0

3.0

<html>

Defines an html document

3.0

3.0

<i>

Defines italic text

3.0

3.0

<iframe>

Defines an inline sub window (frame)

6.0

4.0

<img>

Defines an image

3.0

3.0

<input>

Defines an input field

3.0

3.0

<ins>

Defines inserted text

6.2

4.0

<isindex>

 

3.0

3.0

<kbd>

Defines keyboard text

3.0

3.0

<label>

Defines a label for a form control

6.2

4.0

<legend>

Defines a title in a fieldset

6.2

4.0

<li>

Defines a list item

3.0

3.0

<link>

Defines a resource reference

4.0

3.0

<map>

Defines an image map 

3.0

3.0

<menu>

Deprecated. Defines a menu list

3.0

3.0

<meta>

Defines meta information

3.0

3.0

<noframes>

Defines a noframe section

3.0

3.0

<noscript>

Defines a noscript section

3.0

3.0

<object>

Defines an embedded object

 

3.0

<ol>

Defines an ordered list

3.0

3.0

<optgroup>

Defines an option group

6.0

 

<option>

Defines an option in a drop-down list

3.0

3.0

<p>

Defines a paragraph

3.0

3.0

<param>

Defines a parameter for an object

3.0

3.0

<pre>

Defines preformatted text

3.0

3.0

<q>

Defines a short quotation

6.2

 

<s>

Deprecated. Defines strikethrough text

3.0

3.0

<samp>

Defines sample computer code

3.0

3.0

<script>

Defines a script

3.0

3.0

<select>

Defines a selectable list

3.0

3.0

<small>

Defines small text

3.0

3.0

<span>

Defines a section in a document

4.0

3.0

<strike>

Deprecated. Defines strikethrough text

3.0

3.0

<strong>

Defines strong text

3.0

3.0

<style>

Defines a style definition

4.0

3.0

<sub>

Defines subscripted text

3.0

3.0

<sup>

Defines superscripted text

3.0

3.0

<table>

Defines a table

3.0

3.0

<tbody>

Defines a table body

 

4.0

<td>

Defines a table cell

3.0

3.0

<textarea>

Defines a text area

3.0

3.0

<tfoot>

Defines a table footer

 

4.0

<th>

Defines a table header

3.0

3.0

<thead>

Defines a table header

 

4.0

<title>

Defines the document title

3.0

3.0

<tr>

Defines a table row

3.0

3.0

<tt>

Defines teletype text

3.0

3.0

<u>

Deprecated. Defines underlined text

3.0

3.0

<ul>

Defines an unordered list

3.0

3.0

<var>

Defines a variable

3.0

3.0

<xmp>

Deprecated. Defines preformatted text. Use <pre> instead

3.0

3.0

 

HTML tags can have attributes. The special attributes for each tag are listed under each tag description. The attributes listed here are the core and language attributes that are standard for all tags (with a few exceptions):

Core Attributes

Not valid in base, head, html, meta, param, script, style, and title elements.

Attribute

Value

Description

class

class_rule or style_rule

The class of the element

id

id_name

A unique id for the element

style

style_definition

An inline style definition

title

tooltip_text 

A text to display in a tool tip

 

Language Attributes

Not valid in base, br, frame, frameset, hr, iframe, param, and script elements.

Attribute

Value

Description

dir

ltr | rtl

Sets the text direction

lang

language_code

Sets the language code

 


Keyboard Attributes

Attribute

Value

Description

accesskey

character

Sets a keyboard shortcut to access an element

tabindex

number

Sets the tab order of an element

New to HTML 4.0 is the ability to let HTML events trigger actions in the browser, like starting a JavaScript when a user clicks on an HTML element. Below is a list of attributes that can be inserted into HTML tags to define event actions.

Window Events

Only valid in body and frameset elements.

Attribute

Value

Description

onload

script

Script to be run when a document loads

onunload

script

Script to be run when a document unloads

 


Form Element Events

Only valid in form elements.

Attribute

Value

Description

onchange

script

Script to be run when the element changes

onsubmit

script

Script to be run when the form is submitted

onreset

script

Script to be run when the form is reset

onselect

script 

Script to be run when the element is selected

onblur

script 

Script to be run when the element loses focus

onfocus

script 

Script to be run when the element gets focus

 


Keyboard Events

Not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, and title elements.

Attribute

Value

Description

onkeydown

script 

What to do when key is pressed

onkeypress

script 

What to do when key is pressed and released

onkeyup

script 

What to do when key is released

 


Mouse Events

Not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, title elements.

Attribute

Value

Description

onclick

script 

What to do on a mouse click

ondblclick

script 

What to do on a mouse double-click

onmousedown

script 

What to do when mouse button is pressed

onmousemove

script 

What to do when mouse pointer moves

onmouseout

script

What to do when mouse pointer moves out of an element

onmouseover

script

What to do when mouse pointer moves over an element

onmouseup

script 

What to do when mouse button is released

 


HTML uses standard 7-BIT ASCII when transmitting data over the Web.

7-BIT ASCII represents 128 different character values (0-127).


7-BIT Printable ASCII Characters

Result

Description

Entity Number

 

space

&#32;

!

exclamation mark

&#33;

"

quotation mark

&#34;

#

number sign

&#35;

$

dollar sign

&#36;

%

percent sign

&#37;

&

ampersand

&#38;

'

apostrophe

&#39;

(

left parenthesis

&#40;

)

right parenthesis

&#41;

*

asterisk

&#42;

+

plus sign

&#43;

,

comma

&#44;

-

hyphen

&#45;

.

period

&#46;

/

slash

&#47;

0

digit 0

&#48;

1

digit 1

&#49;

2

digit 2

&#50;

3

digit 3

&#51;

4

digit 4

&#52;

5

digit 5

&#53;

6

digit 6

&#54;

7

digit 7

&#55;

8

digit 8

&#56;

9

digit 9

&#57;

:

colon

&#58;

;

semicolon

&#59;

<

less-than

&#60;

=

equals-to

&#61;

>

greater-than

&#62;

?

question mark

&#63;

@

at sign

&#64;

A

uppercase A

&#65;

B

uppercase B

&#66;

C

uppercase C

&#67;

D

uppercase D

&#68;

E

uppercase E

&#69;

F

uppercase F

&#70;

G

uppercase G

&#71;

H

uppercase H

&#72;

I

uppercase I

&#73;

J

uppercase J

&#74;

K

uppercase K

&#75;

L

uppercase L

&#76;

M

uppercase M

&#77;

N

uppercase N

&#78;

O

uppercase O

&#79;

P

uppercase P

&#80;

Q

uppercase Q

&#81;

R

uppercase R

&#82;

S

uppercase S

&#83;

T

uppercase T

&#84;

U

uppercase U

&#85;

V

uppercase V

&#86;

W

uppercase W

&#87;

X

uppercase X

&#88;

Y

uppercase Y

&#89;

Z

uppercase Z

&#90;

[

left square bracket

&#91;

\

backslash

&#92;

]

right square bracket

&#93;

^

caret

&#94;

_

underscore

&#95;

`

grave accent

&#96;

a

lowercase a

&#97;

b

lowercase b

&#98;

c

lowercase c

&#99;

d

lowercase d

&#100;

e

lowercase e

&#101;

f

lowercase f

&#102;

g

lowercase g

&#103;

h

lowercase h

&#104;

i

lowercase i

&#105;

j

lowercase j

&#106;

k

lowercase k

&#107;

l

lowercase l

&#108;

m

lowercase m

&#109;

n

lowercase n

&#110;

o

lowercase o

&#111;

p

lowercase p

&#112;

q

lowercase q

&#113;

r

lowercase r

&#114;

s

lowercase s

&#115;

t

lowercase t

&#116;

u

lowercase u

&#117;

v

lowercase v

&#118;

w

lowercase w

&#119;

x

lowercase x

&#120;

y

lowercase y

&#121;

z

lowercase z

&#122;

{

left curly brace

&#123;

|

vertical bar

&#124;

}

right curly brace

&#125;

~

tilde

&#126;

 


7-BIT ASCII Device Control Characters

ASCII device control characters were originally designed to control hardware devices like printers and tape drives. These characters have nothing to do inside any HTML document.

Result

Description

Entity Number

NUL

null character

&#00;

SOH

start of header

&#01;

STX

start of text

&#02;

ETX

end of text

&#03;

EOT

end of transmission

&#04;

ENQ

enquiry

&#05;

ACK

acknowledge

&#06;

BEL

bell (ring)

&#07;

BS

backspace

&#08;

HT

horizontal tab

&#09;

LF

line feed

&#10;

VT

vertical tab

&#11;

FF

form feed

&#12;

CR

carriage return

&#13;

SO

shift out

&#14;

SI

shift in

&#15;

DLE

data link escape

&#16;

DC1

device control 1

&#17;

DC2

device control 2

&#18;

DC3

device control 3

&#19;

DC4

device control 4

&#20;

NAK

negative acknowledge

&#21;

SYN

synchronize

&#22;

ETB

end transmission block

&#23;

CAN

cancel

&#24;

EM

end of medium

&#25;

SUB

substitute

&#26;

ESC

escape

&#27;

FS

file separator

&#28;

GS

group separator

&#29;

RS

record separator

&#30;

US

unit separator

&#31;

DEL

delete (rubout)

&#127;

ASCII Entities with new Entity Names

Result

Description

Entity Name

Entity Number

"

quotation mark

&quot;

&#34;

&

ampersand

&amp;

&#38;

<

less-than

&lt;

&#60;

>

greater-than

&gt;

&#62;

 


ISO 8859-1 Symbol Entities

Result

Description

Entity Name

Entity Number

 

non-breaking space

&nbsp;

&#160;

¡

inverted exclamation mark

&iexcl;

&#161;

¤

currency

&curren;

&#164;

¢

cent

&cent;

&#162;

£

pound

&pound;

&#163;

¥

yen

&yen;

&#165;

¦

broken vertical bar

&brvbar;

&#166;

§

section

&sect;

&#167;

¨

spacing diaeresis

&uml;

&#168;

©

copyright

&copy;

&#169;

ª

feminine ordinal indicator

&ordf;

&#170;

«

angle quotation mark (left)

&laquo;

&#171;

¬

negation

&not;

&#172;

­

soft hyphen

&shy;

&#173;

®

registered trademark

&reg;

&#174;

trademark

&trade;

 

¯

spacing macron

&macr;

&#175;

°

degree

&deg;

&#176;

±

plus-or-minus 

&plusmn;

&#177;

²

superscript 2

&sup2;

&#178;

³

superscript 3

&sup3;

&#179;

´

spacing acute

&acute;

&#180;

µ

micro

&micro;

&#181;

paragraph

&para;

&#182;

·

middle dot

&middot;

&#183;

¸

spacing cedilla

&cedil;

&#184;

¹

superscript 1

&sup1;

&#185;

º

masculine ordinal indicator

&ordm;

&#186;

»

angle quotation mark (right)

&raquo;

&#187;

¼

fraction 1/4

&frac14;

&#188;

½

fraction 1/2

&frac12;

&#189;

¾

fraction 3/4

&frac34;

&#190;

¿

inverted question mark

&iquest;

&#191;

×

multiplication

&times;

&#215;

÷

division

&divide;

&#247;

Colors are displayed combining  RED, GREEN, and BLUE light sources.

Color Values

Colors are defined using a hexadecimal notation for the combination of Red, Green, and Blue color values (RGB). The lowest value that can be given to one light source is 0 (hex #00). The highest value is 255 (hex #FF).

This table shows the result of combining Red, Green, and Blue light sources:.

Color

Color HEX

Color RGB

 

#000000

rgb(0,0,0)

 

#FF0000

rgb(255,0,0)

 

#00FF00

rgb(0,255,0)

 

#0000FF

rgb(0,0,255)

 

#FFFF00

rgb(255,255,0)

 

#00FFFF

rgb(0,255,255)

 

#FF00FF

rgb(255,0,255)

 

#C0C0C0

rgb(192,192,192)

 

#FFFFFF

rgb(255,255,255)

 


Color Names

A collection of color names are supported by newer versions of both Netscape and Internet Explorer.

Note: Only 16 color names are supported by the W3C HTML 4.0 standard (aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow). For all other colors you should use the Color HEX value.

Color

Color HEX

Color Name

 

#F0F8FF

AliceBlue

 

#FAEBD7

AntiqueWhite

 

#7FFFD4

Aquamarine

 

#000000

Black

 

#0000FF

Blue

 

#8A2BE2

BlueViolet

 

#A52A2A

Brown

 

Web Safe Colors

A few years ago, when most computers supported only 256 different colors, a list of 216 Web Safe Colors was suggested as a Web standard. The reason for this was that Microsoft and Mac operating system used 40 different "reserved" fixed system colors (about 20 each).

We are not sure how important this is now, since more and more computers are equipped with the ability to display millions of different colors, but the choice is left to you.

216 Cross Platform Colors

This 216 cross platform web safe color palette was originally created to ensure that all computers would display all colors correctly when running a 256 color palette.

000000

000033

000066

000099

0000CC

0000FF

003300

003333

003366

003399

0033CC

0033FF

006600

006633

006666

006699

0066CC

0066FF

009900

009933

009966

009999

0099CC

0099FF

00CC00

00CC33

00CC66

00CC99

00CCCC

00CCFF

00FF00

00FF33

00FF66

00FF99

00FFCC

00FFFF

330000

330033

330066

330099

3300CC

3300FF

333300

333333

333366

333399

3333CC

3333FF

336600

336633

336666

336699

3366CC

3366FF

339900

339933

339966

339999

3399CC

3399FF

33CC00

33CC33

33CC66

33CC99

33CCCC

33CCFF

33FF00

33FF33

33FF66

33FF99

33FFCC

33FFFF

660000

660033

660066

660099

6600CC

6600FF

663300

663333

663366

663399

6633CC

6633FF

666600

666633

666666

666699

6666CC

6666FF

669900

669933

669966

669999

6699CC

6699FF

66CC00

66CC33

66CC66

66CC99

66CCCC

66CCFF

66FF00

66FF33

66FF66

66FF99

66FFCC

66FFFF

990000

990033

990066

990099

9900CC

9900FF

993300

993333

993366

993399

9933CC

9933FF

996600

996633

996666

996699

9966CC

9966FF

999900

999933

999966

999999

9999CC

9999FF

99CC00

99CC33

99CC66

99CC99

99CCCC

99CCFF

99FF00

99FF33

99FF66

99FF99

99FFCC

99FFFF

CC0000

CC0033

CC0066

CC0099

CC00CC

CC00FF

CC3300

CC3333

CC3366

CC3399

CC33CC

CC33FF

CC6600

CC6633

CC6666

CC6699

CC66CC

CC66FF

CC9900

CC9933

CC9966

CC9999

CC99CC

CC99FF

CCCC00

CCCC33

CCCC66

CCCC99

CCCCCC

CCCCFF

CCFF00

CCFF33

CCFF66

CCFF99

CCFFCC

CCFFFF

FF0000

FF0033

FF0066

FF0099

FF00CC

FF00FF

FF3300

FF3333

FF3366

FF3399

FF33CC

FF33FF

FF6600

FF6633

FF6666

FF6699

FF66CC

FF66FF

FF9900

FF9933

FF9966

FF9999

FF99CC

FF99FF

FFCC00

FFCC33

FFCC66

FFCC99

FFCCCC

FFCCFF

FFFF00

FFFF33

FFFF66

FFFF99

FFFFCC

FFFFFF

Color Values

HTML colors are defined using a hexadecimal notation for the combination of Red, Green, and Blue color values (RGB). The lowest value that can be given to one of the light sources is 0 (hex #00). The highest value is 255 (hex #FF).


Turn Off the Red

If you turn off the Red light completely, there are 65536 different combination of Green and Blue (256 x 256) to experiment with.


Turn On the Red

By setting the Red parameter to its maximum value, there are still 65536 different combination of Green and Blue (256 x 256) to experiment with.


16 Million Different Colors

The combination of Red, Green and Blue values from 0 to 255 gives a total of more than 16 million different colors to play with (256 x 256 x 256).

Most modern monitors are capable of displaying at least 16384 different colors.

If you look at the color table below, you will see the result of varying the red light from 0 to 255, while keeping the green and blue light at zero.

To see a full list of 16384 different colors based on red light varying from 0 to 255, click on one of the hexadecimal or rgb values below.

Red Light

HEX

RGB

 

#000000 

rgb(0,0,0) 

 

#080000 

rgb(8,0,0) 

 

#100000 

rgb(16,0,0) 

 

#180000 

rgb(24,0,0) 

 

#200000 

rgb(32,0,0) 

 

#280000 

rgb(40,0,0) 

 

#300000 

rgb(48,0,0) 

 

#380000 

rgb(56,0,0) 

 

#400000 

rgb(64,0,0) 

 

#480000 

rgb(72,0,0) 

 

#500000 

rgb(80,0,0) 

 

#580000 

rgb(88,0,0)