Web4College

CSS text-overflow property

src

Description

CSS text-overflow property specifies the rendering of inline content at the end of line box If it does not fit within a parent block container.

The parent block container must have a value other than 'visible' for the overflow property.

Syntax

text-overflow : clip | ellipsis

Property values

clipDefault

In this case, the inline content that overflows its container is clipped.

text-overflow: clip;
Try it

ellipsis

In this case, it shows ellipsis character at the end of line to represent the clipped inline content. It ellipsis character is not available, the string '...' is used at the end.

text-overflow: ellipsis;
Try it

Applicable to

It applies to block containers.