TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

HTML wbr tag

HTML wbr tag with examples, html5, forms, input, text, anchor, image, heading, marquee, textarea, paragraph, title, quotes, code etc.

<< Back to HTML

HTML Wbr Tag

HTML <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> tag

The <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> tag

To 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...
<i> pneumonoultramicroscopicsilicovolcanoconiosis </i></p> <p> It will look like this after using wbr tag. </p> <i> pneu<wbr>monoultra<wbr>microsc<wbr>opicsili<wbr>covolcan<wbr>iosis</i>
Test it Now

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 wbr tag...
pneumonoultramicroscopicsilicovolcanoconiosis

It will look like this after using wbr tag.

pneumonoultramicroscopicsilicovolcaniosis

The <wbr> tag supports global and event attributes in HTML 5.


Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<wbr>YesYesYesYesYes
Next TopicHTML Tags List




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf