2.15 br and wbr Elements
In this section, we discuss two elements that deal with line breaks. You already know about the br element, which is a void element that causes subsequent text to start on the next line. The wbr element (wbr stands for “word break”) is similar to the br element in that it’s a void element. But whereas the browser treats br as a required break between words, the browser treats wbr as a suggested break within a word if the word bumps into the right side of its containing box. So far, the only “containing box” has been the browser window’s main box, defined by the body element. Later, you’ll see how we can create smaller containing boxes within the browser window’s main box.
See FIGURE 2.10 and note the sup element. We’ll ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access