Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

In HTML, what is a non-breaking space?

A non-breaking space prevents line breaks from occurring at a particular point in an HTML document. To use a non-breaking space, you would use the following:

 

For example, if you wanted the words "Mr." and "Foo" to appear together even if a line break would normally separate the two words, you would use the following:

Mr. Foo

Unlike other empty spaces in HTML documents, the effects of non-breaking spaces are cumulative. That is, while browsers weed out extra white space when rendering a page, all non-breaking spaces are rendered. They're especially useful inside <code> tags, for example:

<code>&nbsp;</code>

These tags cause the spaces to be rendered in a monospace font rather than a proportional font, thus guaranteeing that the spaces will always appear with a fixed size.

A non-breaking space also counts as real content, which is useful to produce an empty table data cell when you have table borders turned on, for example:

<td>&nbsp;</td>

The symbols that produce the non-breaking space (&nbsp;) form what is called a character entity. Many such character entities exist for producing unusual characters in HTML documents. For more information, see How do I use special characters on my web page?

This is document agjn in domain all.
Last modified on November 06, 2009.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.