Text Overflow and Wrapping
white-space: nowrap stops wrapping and text-overflow: ellipsis shows three dots when text is cut. word-break and overflow-wrap break long words.
Example
<style>
.t { width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #1e293b }
</style>
<div class="t">A long line of text that will be cut with an ellipsis</div>Exercise
Show three dots.
text-overflow: ;
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.