HTML 5 | <wbr> Tag

The <wbr> tag in HTML stands for word break opportunity and is used to define the position within the text which is treated as a line break by the browser. It is mostly used when the used word is too long and there are chances that the browser may break lines at the wrong place for fitting the text.

Syntax:

<wbr>

Note: The <wbr> tag is new in HTML5 and it does not require end tag.

Below examples illustrate the <wbr> tag in HTML 5:

Example 1:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
    <head>
        <title>wbr Tag</title>
        <style>
            body {
                text-align:center;
            }
            .gfg {
                font-size:40px;
                font-weight:bold;
                color:green;
            }
            .geeks {
                font-size:25px;
                font-weight:bold;
            }
        </style>
    </head>
    <body>
        <div class = "gfg">GeeksforGeeks</div>
        <div class = "geeks"><wbr> Tag</div>
        <p>GFGstandsforGeeksforGeeks
         anditis<wbr>acomputerscienceportalforgeeks.</p>
    </body>
</html>                    

chevron_right


Output:

Supported Browsers: The browsers supported by <wbr> tag are listed below:

  • Google Chrome 1
  • Internet Explorer 12.0
  • Firefox 3
  • Opera 11.7
  • Safari 4


My Personal Notes arrow_drop_up

I am a technology enthusiast who has a keen interest in programming I am pursuing Engineering in Computer Science from GEU, Dehradun I like to unwind by watching movies and English sitcomsI have a keen interest in music

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.