Software engineering engineer at a national public broadcaster. Best practices / developer experience / agile / diversity and inclusion / psychological safety
The <wbr> elements in your first example don’t do anything useful though, because browsers already handle line breaks between words automatically. As the name “word break” implies, it’s meant for introducing breaks within words, or things that might be treated as a single word, like very long URLs.
Browsers handle line breaks between words and syllables automatically, provided there's a grammar package for the language you have defined in your HTML tag. Might be useful for content managers in languages where automatic hyphenation or word breaking doesn't work. An alternative would be to use a soft hyphen character (compart.com/en/unicode/U+00AD) which also suggests a word break possibility for the browser.
Hey, nice list!
The
<wbr>
elements in your first example don’t do anything useful though, because browsers already handle line breaks between words automatically. As the name “word break” implies, it’s meant for introducing breaks within words, or things that might be treated as a single word, like very long URLs.Thanks @chuniversiteit !
Good point, regarding long URLs. Will surely note it :-)
Browsers handle line breaks between words and syllables automatically, provided there's a grammar package for the language you have defined in your HTML tag. Might be useful for content managers in languages where automatic hyphenation or word breaking doesn't work. An alternative would be to use a soft hyphen character (compart.com/en/unicode/U+00AD) which also suggests a word break possibility for the browser.
Hey @priitpu !
Thanks for commenting :-)
I never knew about soft-hyphen thing, thanks for letting me know.