Skip to content
All Challenges
#55

Text Truncate with Ellipsis

Medium
Category: Typography

Truncate overflowing text on a single line in .truncate with an ellipsis (...).

Target HTML in preview:
<div class="truncate" style="width: 120px;">This text is way too long to fit in 120 pixels.</div>
Verification Criteria:
Set text-overflow: ellipsis
Set white-space: nowrap
Set overflow: hidden
styles.css
Live Evaluation
Loading...
|
Live Browser Output
Sandboxed Preview