skip to Main Content

WBR HTML Tag

The little known WBR tag is great for formatting HTML tables. Add it to specific places in your table cell values to give the browser the option to add a line break there. This is very useful when displaying tables with long strings that would otherwise cause horizontal scrolling.

Here’s a sample table, displaying some info. Since the values in the tables do not have spaces or tabs, the browser is forced to display the values on one line:

KeyValue
ChinhDo.TestApp.TestClass.ExampleKey1this.is.an.example.of.a.very.long.string

Here’s the same table, with <wbr/> tags inserted where periods are:

KeyValue
ChinhDo.TestApp.TestClass.ExampleKey1this.is.an.example.of.a.very.long.string

I occasionally blog about programming (.NET, Node.js, Java, PowerShell, React, Angular, JavaScript, etc), gadgets, etc. Follow me on Twitter for tips on those same topics. You can also find me on GitHub.

See About for more info.

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top