A Quick HTML Tutorial

 

 
   
 A Quick HTML Tutorial (with an introduction to Hexadecimal): By Nick Phipps admin@glowwyrm.cjb.net

Decimal notation is the number system we normally use in life. It uses the digits 0 to 9 to represent values.
Place-values start at 1 and increase in value ten times when travelling to the left, and decrease in value ten times when travelling to the right. A decimal point indicates that the place immediately to the left is the "ones" place (100) - Any number to the power of 0 (x0) is equal to 1
EG:

12345.67
= (1 × 104) + (2 × 103) + (3 × 102) + (4 × 101) + (5 × 100) + (6 × 10-1) + (7 × 10-2)
= (1 × 10000) + (2 × 1000) + (3 × 100) + (4 × 10) + (5 × 1) + (6 × .1) + (7 × .01)
= 10000 + 2000 + 300 + 40 + 5 + 0.6 + 0.07
=12345.67

Hexadecimal notation works similarly, except that instead of being based on the number 10 it is based on the number 16 (there are reasons for this to do with the way computers work... but that's another story).
Instead of just using the digits 0 to 9, hexadecimal also uses A to F to represent the values 10 to 15.

1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
10 = 16
11 = 17
etc...

EG:

5CF.A7 (hex.)
= (5 × 162) + (12 × 161) + (15 × 160) + (10 × 16-1) + (7 × 16-2)
= (5 × 256) + (12 × 16) + (15 × 1) + (10 × 0.0625) + (7 × 0.00390625)
= 1280 + 192 + 15 + 0.625 + 0.02734375
= 1487.652344 (dec.)

The easiest way to convert between decimal and hexadecimal for most people is to use the Microsoft Windows Calculator. Set the calculator to "Scientific mode" (via the view menu). Make sure the "dec" option is selected. Enter your decimal value. select the "hex" option. Voila! Your number has been converted to Hexadecimal. This process also works in reverse.


 HTML Text Colours:
To change the colour of your text in HTML you use the following tag:

<font color="#RRGGBB"> ENTER YOUR TEXT HERE </font>

RR = Red value of colour. Two digit Hexadecimal number representing a number from 0 to 127.
GG = Green value of colour. Two digit Hexadecimal number representing a number from 0 to 127.
BB = Blue value of colour. Two digit Hexadecimal number representing a number from 0 to 127.
ENTER YOUR TEXT HERE = The text you want to change the colour of.

Some colours for those of you not familliar with additive colours on RGB displays (The black backgrounds are only for visibility and are not created by using the colours):

Bright Red    = #FF0000
Dark Red      = #800000
Bright Green  = #00FF00
Dark Green    = #008000
Bright Blue   = #0000FF
Dark Blue     = #000080
Bright Cyan   = #00FFFF
Dark Cyan     = #008080
Bright Purple = #FF00FF
Dark Purple   = #800080
Yellow        = #FFFF00
Orange        = #FF8000
Brown         = #CC8000
White         = #FFFFFF
Black         = #000000
Bright Gray   = #CCCCCC
Gray          = #808080
Dark Gray     = #404040
Happy HTML-ing

glow wyrm (A.K.A. Nick Phipps)
Email: glowwyrm@goatrance.com

Copyright glow wyrm (A.K.A. Nicholas Phipps) © 2001-2002.   All materials and registered trademarks herein are copyright of their respective owners.
 
Return to main page.