Open this example in the interactive library
Source code
<style>
.demo {
white-space: pre-wrap;
max-width: 20ch;
}
</style>
<div class="demo">First line Indented line with extra words</div>
Preserve newlines and wrap long lines with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo {
white-space: pre-wrap;
max-width: 20ch;
}
</style>
<div class="demo">First line Indented line with extra words</div>