Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> div.element1 { white-space: nowrap; background-color: #eee; width: 50px; overflow: hidden; text-overflow: clip; border: 1px solid #666; } div.element2 { white-space: nowrap; background-color: #eee; width: 50px; overflow: hidden; text-overflow: ellipsis; border: 1px solid #666; } div.element3 { white-space: nowrap; background-color: #eee; width: 50px; overflow: hidden; text-overflow: initial; border: 1px solid #666; } </style> </head> <body> <h2>Text-overflow property example</h2> <h3>text-overflow: clip</h3> <div class="element1">Lorem Ipsum</div> <h3>text-overflow: ellipsis</h3> <div class="element2">Lorem Ipsum</div> <h3>text-overflow: initial</h3> <div class="element3">Lorem Ipsum</div> </body> </html>