Extensible HyperText Markup Language

XHTML.com recommends: PSD to HTML Slicing Service

Property Data Types

angle

A number immediately followed by one of the following angle unit identifiers:

deg
degrees
grad
grads
rad
radians

If the value is 0, the unit may be ommited. For example, "0deg" may be written as "0".

color

A keyword or a numerical RGB specification. Keywords are:

aqua
RGB: #00FFFF
black
RGB: #000000
blue
RGB: #0000FF
fuchsia
RGB: #FF00FF
gray
RGB: #808080
green
RGB: #008000
lime
RGB: #00FF00
maroon
RGB: #800000
navy
RGB: #000080
olive
RGB: #808000
orange
RGB: #FFA500
purple
RGB: #800080
red
RGB: #FF0000
silver
RGB: #C0C0C0
teal
RGB: #008080
white
RGB: #FFFFFF
yellow
RGB: #FFFF00

This example shows different ways to specify red color.

  1. em {color: red}
  2. em {color: rgb(255,0,0)}
  3. em {color: #f00}
  4. em {color: #ff0000}
  5. em {color: rgb(100%, 0%, 0%)}

counter

A counter is used to keep track of numbering for dynamically generated content via CSS. A counter is created using the function counter() or counters() of the content property. The counter can be incremented using the counter-increment property. The counter can be reset using the counter-reset.

This example show how to create a counter with a name "para" that will insert an uppercase roman numeral (followed by a period and a space character) before the text of a paragraph.

  1. p:before {content: counter(para, upper-roman) ". "}
  2. p {counter-increment: para}

frequency

A positive number immediately followed by one of the following frequency unit identifiers:

Hz
Hertz
kHz
kilohertz

If the value is 0, the unit may be ommited. For example, "0Hz" may be written as "0".

identifier

A name that contains letter characters (a to z and/or A to Z), numbers (0 to 9), hyphens (-) and/or underscores (_). A name cannot start with a number or a hyphen followed by a number.

integer

An integer value. May be may be preceded by a "-" sign to indicate negative number. For example:

  1. 0
  2. 10
  3. -5

length

A number immediately followed by one of the following length unit identifiers:

em
The font-size of the given font.
ex
The hight of the lowercased letter "x" of the given font.
px
Pixels, relative to the viewing device.
in
Inches - 1 inch is equal to 2.54 centimeters.
cm
Centimeters.
mm
Millimeters.
pt
Points - the points used by CSS 2.1 are equal to 1/72nd of an inch.
pc
Picas - 1 pica is equal to 12 points.

Length refer to horizontal or vertical measurement.

number

A number with a decimal value. May be may be preceded by a "-" sign to indicate negative number. For example:

  1. 2.5

percentage

A number immediately followed by "%". For example:

  1. 120%

string

Text written in single or double quotes. For example:

  1. "Hello World!"
  2. 'Hello World!'
  3. "I'm here"
  4. 'Jack said "Hello"'

Double quotes cannot occur inside double quotes, unless escaped as \" or \22. For example:

  1. "Jack said \"Hello\""
  2. "Jack said \22Hello\22"

Single quotes cannot occur inside single quotes unless escaped as \' or \27. For example:

  1. 'I\'m here'
  2. 'I\27m here'

time

A positive number immediately followed by one of the following time unit identifier:

ms
milliseconds
s
seconds

If the value is 0, the unit may be ommited. For example, "0s" may be written as "0".

uri

A URL written as url(X) where "X" is the URL which may be enclosed in double or single quotes. For example:

  1. url(http://xhtml.com/images/logo.gif)
  2. url('images/logo.gif')
  3. url("logo.gif")