CSS: Percentage Value

By Xah Lee. Date: .

% is percentage.

Example:

div {width:5%}

Percentage is not technically considered a “length unit”.

Meaning of percent value is dependent on the specific property.

css percentage K4p46
CSS 2.1 spec, 4.3.3 Percentages

[see HTML: the Root Element]

💡 TIP: don't use percentage value, because its meanings is complex. Use vw, vh, vmin, vmax instead.

back to CSS: Length Units

CSS Basics