October 22, 2011

Non-breaking space,  

&nbsp; stands for non-breaking space character or simply known as space character. It should be typed in lower case letters. Just like the angle brackets (<, >), browsers also read commands between ampersand “&” and “;”. Let us see the effect of non-breaking space tag on your webpage by typing in the code below on your text editor.


<p>          I am a paragraph and I am not 
indented eventhough I hit the space bar 10 times.</p>
&nbsp; I am a paragraph and I am indented by 10
 character spaces using non breaking space tag.</p>


The code above will be displayed like this in Mozilla Firefox.
click to enlarge

Based on what you have observed in your web browser, what is the effect of &amp;nbsp;  to the texts placed after it?


HD Cafe said...

An awesome article, thanks for sharing it.

HD Cafe