The Mudcat Café TM
Thread #17523   Message #1548296
Posted By: MudGuard
24-Aug-05 - 12:57 AM
Thread Name: html practice thread 1/2000
Subject: RE: html practice thread 1/2000
When you use the letters & numbers, it's called a 'hex' code. It's called that because there are 6 of them.

Wrong. First, it's not & but # for the color codes, second, as Joe already said, it's called hex code as abbreviation of hexadecimal code.
In HTML, you always use 6 digits, but in CSS, there are situations where you use 3 digits only (and it is still called hex code).
e.g: <span style="background-color:#fed; color:#930; border-width:3px; border-style:solid; border-color:#f9f #9ff #369 #6fc;">some funny colors</span> which looks like some funny colors

(when there are only three hex digits, the value is interpreted as if each digit had been written twice: #fed ==> #ffeedd, #930 ==> #993300, #f9f ==> #ff99ff, #9ff ==> #99ffff, #369 ==> #336699, #6fc ==> #66ffcc ...)