HTML Guide for line-height
An invalid value is provided for the line-height CSS property.
The line-height property in CSS controls the amount of space between lines of text. Valid values for line-height include: a unitless number (relative to the font size), a length unit (such as px, em, rem), a percentage, or the keyword normal. Invalid values, such as misspelled numbers or unsupported units, will cause a validation error.
Examples of valid values:
- line-height: normal;
- line-height: 1.5;
- line-height: 24px;
- line-height: 120%;
Example of valid usage:
<p style="line-height: 1.5;">This is text with a valid line-height value.</p>
HTML document with correct inline style:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Valid line-height Example</title>
</head>
<body>
<p style="line-height: 2;">A paragraph with valid line-height.</p>
</body>
</html>