HTML
CSS
JavaScript
jQuery
PHP
SQL
WordPress
HTML Tutorials

Overview

A non-breaking space has two common functions. It can be used between words so that the browser doesn’t split the words across two lines.

				
					<h2>We&nbsp;Don't&nbsp;Want&nbsp;this&nbsp;Split</h2>
				
			

It can also be used if you want to have extra space between elements such as an icon element and a word. Putting two simple spaces next to one another won’t work because the browser will just remove the extra space. But using &nbsp;&nbsp; next to one another will output the equivalent of two spaces.

				
					<p><i class="fa-solid fa-link"></i>&nbsp;&nbsp;We don't want the icon too close to the text.</p>
				
			

However, the best way to create extra spacing is through the use of CSS to style the element.

We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.

HTML
CSS
JavaScript
jQuery
PHP
SQL
WordPress

Why 1SMARTchicken?

This site was built and is maintained to benefit my autistic son.
See More →

My Son's Name is Johnny

He was diagnosed as autistic quite late, at age four...
His story

Buy Me a Coffee

Thanks for your support!

Feedback

If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.