Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

CSS: “font-size”: “px” is not a “font-size” value.

The value passed to the font-size property is invalid, probably missing the amount of px.

The font-size CSS property sets the size of the font, and this size can be expressed in different units, like em, % or px.

Example:

<!DOCTYPE html>
<html>
<head>
	<title>Font-size Example</title>
	<style>
		p {
			font-size: 16px;
		}
	</style>
</head>
<body>
	<p>This is an example of a paragraph with a font-size of 16px.</p>
</body>
</html>

Learn more:

Related W3C validator issues