HTML: Values and Units

Length values

Length values come in two varieties:

  • Relative lengths, which vary depending on the computer being used.
  • Absolute values, which remain constant regardless of the hardware and software being used.

Relative lengths values:

  • em: Em dash
  • ex: x-height
  • px: pixel

Absolute length values:

  • pt: Point
  • pc: Picas
  • mm: millimeters
  • cm: centimeters
  • in: Inches

Color values

Color can be written in different way,

  • #RRGGBB
  • rgb(R#, G#, B#)
  • rgb(R%, G%, B%)
  • name

Percentage

The behavior of percentage value depends on the property being used.

URLs

A uniform resource locator (URL) is the unique address of something on the Web.  URL can be written so that it cancel itself

<a href="#">Link</a>

or

<a href="javascript: void('')">Link</a>

In some situation placing any URL in the href will interfer with the DHTML functions so the latter code will be used instead. These function simply tells the link to do absolutely nothing.

 

Like this post? Share it!

digg 48 HTML: Values and Units reddit 48 HTML: Values and Units stumbleupon 48 HTML: Values and Units delicious 48 HTML: Values and Units furl 48 HTML: Values and Units technorati 48 HTML: Values and Units google 48 HTML: Values and Units myspace 48 HTML: Values and Units facebook 48 HTML: Values and Units twitter 48 HTML: Values and Units
share save 171 16 HTML: Values and Units

No related posts.

About Clay

I am Clay who is the main writer for this website. I own a small web hosting company in Malaysia and i'm available to be hired as individual contractor on elance. You can find me on twitter.
This entry was posted in Developer, Informative. Bookmark the permalink.

Comments are closed.