In CSS, the max-width property is used to specify the maximum width of an element. The width value cannot be greater than the value returned by max-width. If the content is larger than the maximum width, it will move to the next line; if the content is smaller than the maximum width, it has no effect.