property
text-overflow — CSS reference
Controls the indicator for inline overflow, not wrapping or block-axis overflow. Initial clip, not inherited. A constrained block with hidden overflow and nowrap can display ellipsis without changing DOM text. Provide access to essential clipped content.
Formal Syntax & Structure
css syntaxcss
clip | ellipsis | <string> (one or two values; support varies)Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS text lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#a{width:90px;overflow:hidden;white-space:nowrap}#a{text-overflow:ellipsis}</style><body><p id="a">Design readable interfaces with CSS.</p><p lang="fa" dir="rtl">متن فارسی برای آزمایش چیدمان</p></body></html>