X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Style textOverflow Property

Style Object Reference Style Object

Example

Change the textOverflow property:

document.getElementById("myDIV").style.textOverflow="ellipsis";

Try it yourself »


Definition and Usage

The textOverflow property specifies what should happen when text overflows the containing element.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The textOverflow property is supported in all major browsers.


Syntax

Return the textOverflow property:

object.style.textOverflow

Set the textOverflow property:

object.style.textOverflow="clip|ellipsis|string|initial|inherit"

Property Values

Value Description
clip Default value. Clips the text
ellipsis Render an ellipsis ("...") to represent clipped text
string Render the given string to represent clipped text
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Technical Details

Default Value: clip
Return Value: A String, representing the text-overflow property of an element
CSS Version CSS3


Related Pages

CSS reference: text-overflow property


Style Object Reference Style Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook