CSS · Properties — CSS Overflow

max-lines

The CSS max-lines property. Initial value: none. Not inherited.

Syntax
max-lines: none | <integer>

Example

Try it

Notes

Media: visual. Applies to: blockContainersExceptMultiColumnContainers. Computed value: asSpecified.

More in this group

line-clamp overflow-block overflow-clip-margin overflow-inline overflow-x overflow-y scroll-axis-lock scroll-behavior

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course