<div class="container">
<p class="box">
Sho‐rt words and specta‐cularly long words render the hard hyphen.
</p>
<p class="box">
Only specta­cularly long wor­ds overflowing the box render the soft hyphen.
</p>
</div>
.container {
display: flex;
width: 200px;
justify-content: space-between;
}
.box {
width: 50px;
border: 1px solid;
-webkit-hyphens: manual;
-ms-hyphens: manual;
hyphens: manual;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.