data-type

<dimension> — CSS reference

A dimension combines a number and a unit identifier in one token. Lengths, angles, times and resolutions are examples of typed dimensions. The unit must be accepted in the receiving property; inserting whitespace between a number and its unit changes the tokenization.

Formal Syntax & Structure

css syntaxcss
12px   /* number immediately followed by unit */

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS reference lab</title><style>#a {width:48px} #b {width:48 px;width:60px}</style><body><div id="parent"><div id="a">Sample</div><div id="b">Comparison</div></div></body></html>
CSS Reference