ExampleUse of the text-overflow property:
Try it yourself » More examples at the bottom of this page. |
The text-overflow property is supported in all major browsers.
The text-overflow property specifies what should happen when text overflows the containing element.
Default value: | clip |
---|---|
Inherited: | no |
Version: | CSS3 |
JavaScript syntax: | object.style.textOverflow="ellipses" |
text-overflow: clip|ellipsis|string; |
Value | Description |
---|---|
clip | Clips the text |
ellipsis | Render an ellipsis ("...") to represent clipped text |
string | Render the given string to represent clipped text |
![]() |
Try it Yourself - Examples |
Text-overflow with a hover effect
This example demonstrates how to display the entire text when hover over the
element.