Style textOverflow property
Example
Change the textOverflow property:
document.getElementById("myDIV").style.textOverflow="ellipsis";
Try it »
Definition and Usage
The textOverflow property specifies how text should be displayed when it overflows the element that contains it.
Browser support

All major browsers support the textOverflow property.
Syntax
Return the textOverflow property:
object
.style.textOverflow
Set the textOverflow property:
object
.style.textOverflow="clip|ellipsis|
string
|initial|inherit"
Attribute values
| Value | Description |
|---|---|
| clip | Default. Clips the text. |
| ellipsis | Use an ellipsis ("...") to represent the clipped text. |
| string | Use a given string to represent the clipped text. |
| initial | Sets this property to its default value. See initial. |
| inherit | Inherits this property from its parent element. See inherit. |
Technical Details
| Default value: | clip |
|---|---|
| Return Value | A string, representing the text-overflow property of an element. |
| CSS version | CSS3 |
Related Articles
CSS Reference Manual:text-overflow property
The Style object