Generally you just need to add
-
white-space: pre-line;
whitespace trimmed to single whitespace or -
white-space: pre-wrap;
all whitespace preserved
to the element’s style (CSS), where you want your text rendered with line-breaks.
More Related Contents:
- How to add a new line in textarea element?
- How to line-break from css, without using ?
- Render a string in HTML and preserve spaces and linebreaks
- How to force a line break in a long word in a DIV?
- Can you target with css?
- Should I size a textarea with CSS width / height or HTML cols / rows attributes?
- CSS Styling text areas like notebook-look
- CSS Not Being Responsive
- Change select box option background color
- Li item on two lines. Second line has no margin
- When to use the !important property in CSS [duplicate]
- Add a background image (.png) to a SVG circle shape
- Two inline-block elements, each 50% wide, do not fit side by side in a single row
- Inline elements and line-height
- Tables instead of DIVs [duplicate]
- Is type=”text/css” necessary in a tag?
- Text overflow ellipsis on two lines
- How can I make a link from a table cell
- Make row stretch across all columns in CSS Grid
- Flexbox affects overflow-wrap behavior
- How does one use the onerror attribute of an img element
- How can I make a TextArea 100% width without overflowing when padding is present in CSS?
- How do I remove the top margin in a web page?
- How can I make a 45 degree responsive ribbon with folded corner?
- Border with a transparent centred arrow
- Add outward curving border to elements like this: ◝◟___◞◜
- Is text-indent: -9999px a bad technique for replacing text with images, and what are the alternatives?
- Radio buttons and label to display in same line
- How to move placeholder to top on focus AND while typing?
- HTML/CSS set div to height of sibling