C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
HTML Wbr TagHTML <wbr> tag is used to specify a line break opportunity within an HTML document. Without wbr tag, it is very difficult to read a long single word or a sentence. Without wbr tag, single long word can wrap or not wrap at all, it creates problem for the layout of the page. Without <wbr> tag, users will have to scroll right to read a long complete word or sentence. The <wbr> tag is new and introduced in HTML 5. The wbr tag doesn't break line.Difference between <wbr> and <br> tagThe <br> tag forces a line break while <wbr> tag only represents a line break opportunity. It only facilitate the browser to line break if necessary (for example at the end of page . How to test <wbr> tagTo test HTML wbr tag, write too many characters without wbr tag, it will enable a scroll bar for you. But if you write too many characters within wbr tag, it will not enable a scroll bar but break the line. HTML wbr tag example<p> This is a world record for the largest word, a 45-letter word appears in a major dictionary <i>pneumonoultramicroscopicsilicovolcanoconiosis</i> </p> <p>Here's what it looks like without using the <code>wbr</code> tag... Output: This is a world record for the largest word, a 45-letter word appears in a major dictionary pneumonoultramicroscopicsilicovolcanoconiosis Here's what it looks like without using the It will look like this after using wbr tag. pneuThe <wbr> tag supports global and event attributes in HTML 5. Supporting Browsers
Next TopicHTML Tags List
|