#development #frontend #html

This snippet is not Laravel related, but we believe it's a super good-to-know snippet, why we decided to put in here. Let's see what the docs say about it:

The HTML element represents a word break opportunity—a position within text where the browser may optionally break a line, though its line-breaking rules would not otherwise create a break at that location.

2    Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
3nonumy eirmod <wbr> tempor invidunt ut labore et dolore magna aliquyam
4erat, sed diam voluptua.

What happens here is, that if the paragraph fits in one line, everything is good. No line break happens and the wbr tag gets ignored. But if the paragraph won't fit in one line it gets breaked at the wbr tag. With that you've full control about line breaks.