Sad Code Monkey

Sad, yes, but also brilliant.

 

Sad Code Monkey is a place where we document new-found techniques and code snippets, and share our knowledge with other code monkeys.

Well, I’ve avoided it long enough. Use NOBR when you don’t want any part of a string to break. I’ve avoided using it on phone numbers forever, basically because I’m lazy. But I finally buckled to the pressure and gave it a go. NOBR also helps avoid the dreaded widows. Here’s a sample code:

<p>To book your travel, please contact Mega World Travel at <NOBR>888-555-1111</NOBR> as soon as possible. More event details coming soon.</p>

Comments are closed.