Search w3schools.com:

SHARE THIS PAGE

CSS Reference

CSS Reference CSS Selectors CSS Reference Aural CSS Web Safe Fonts CSS Units CSS Colors CSS Color Values CSS Color Names CSS Color HEX CSS3 Browser Support

CSS Properties

CSS3 text-overflow Property


Example

Use of the text-overflow property:

div.test
{
text-overflow:ellipsis;
}

Try it yourself »
More examples at the bottom of this page.

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The text-overflow property is supported in all major browsers.


Definition and Usage

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="ellipsis"


Syntax

text-overflow: clip|ellipsis|string;

Value Description Play it
clip Clips the text Play it »
ellipsis Render an ellipsis ("...") to represent clipped text Play it »
string Render the given string to represent clipped text


Examples

Try it Yourself - Examples

Text-overflow with a hover effect
This example demonstrates how to display the entire text when hover over the element.


Related Pages

CSS3 tutorial: CSS3 Text Effects



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]