CSS text-overflow property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxFully supports
Internet ExplorerFully supports
EdgeFully supports
OperaFully supports
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.
- Try it
text-overflow: clip; 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.
- Try it
text-overflow: ellipsis;
Applicable to
It applies to block containers.