Two ways to safely break a long word in HTML

1 · Amit Merchant · Jan. 19, 2023, 7:37 a.m.
In HTML, if you have a long word that doesn’t fit into the container, it will overflow the container and will break the layout. So, to avoid this, there are two ways to safely break a long word in HTML. Using the <wbr> tag Using the &shy; entity Using the <wbr> tag The <wbr> tag stands for “word break opportunity” and it’s a non-semantic tag that tells the browser to break the word at the specified point. So, if you have a long word like supercalifragilisticexpialidocious and you want to break...