Chapter 20. Supplemental Topics

Non-breaking Space –  

Non-breaking Space –  
Tag:

A non-breaking space ( ) is an HTML entity that is used as a replacement for space.

Why is non-breaking space ( ) needed?

HTML doesn't recognize more than one space. Even if you hit multiple spaces, when you open the HTML document with a browser, you won't see more than one space.

For example, the code below has multiple spaces under the <p> tag; however, the multiple spaces are not rendered in the browser.

Non-breaking-Space--nbsp;

How does non-breaking space (&nbsp;) work?

A set of &nbsp; (non-breaking space) in a text line creates multiple spaces like in the example below.

Non-breaking-Space--nbsp;

A non-breaking space (&nbsp;) is an HTML entity that is used as a replacement for space.

Why is non-breaking space (&nbsp;) needed?

HTML doesn't recognize more than one space. Even if you hit multiple spaces, when you open the HTML document with a browser, you won't see more than one space.

For example, the code below has multiple spaces under the <p> tag; however, the multiple spaces are not rendered in the browser.

Non-breaking-Space--nbsp;

How does non-breaking space (&nbsp;) work?

A set of &nbsp; (non-breaking space) in a text line creates multiple spaces like in the example below.

Non-breaking-Space--nbsp;

Tag: