What are those   things?

liunx

Guest
Every once in a while I'll be looking at source code to learn and I see these things like &nbsp; . What are they?<!--content-->they're codes for characters like: ?, ?. and so on...They're mostly there so you don't have to find the code on the keyboard...but I don't see why they use the space code instead of .<!--content-->Iceman, that's part of a set of codes for "special characters". <br />
<br />
Generally, in html, you're only allowed one space between words or punctuation. There are times, however, when you might want to add a couple more.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Five of the little darlin's do wonders for indenting paragraphs. The one that you're referring to is the "non-breaking" space. <br />
<br />
Another use for the non-breaking space is when you're talking about titles with numbers on them. Phrases like "King Henry VIII" might be divided between two lines, at one of the spaces. It makes it hard to read, especially on wider screens. By adding a non-breaking space between "King" and "Henry" and another between "Henry" and "VIII", the entire phrase will be kept together. <br />
<br />
There are codes, as well, for the "greater than" and "less than" signs, for the cent sign, copyright and trademark symbols and so on. They even have a few for characters found in other languages. I have a list of them that I got off the Net, but I can't remember where. <br />
<br />
Any place that has html tutorials should have a list of html commands and the "special character" codes.<br />
<br />
Does that help any?<br />
<br />
Peg<!--content-->I have a list of them that I got off the Net, but I can't remember where. <br />
<br />
Peg likes to keep useful stuff handy, on index cards & bits of notepaper, so that she can find it when she needs it...<br />
<br />
Here's a list for ya:<br />
Webmonkey (<!-- m --><a class="postlink" href="http://hotwired.lycos.com/webmonkey/reference/special_characters/">http://hotwired.lycos.com/webmonkey/ref ... haracters/</a><!-- m -->) <br />
<br />
Cheers<br />
:D<!--content-->...but I don't see why they use the space code <br />
instead of . <br />
<br />
one reason would be if you wanted to put multiple spaces between something...if you just place 4 or 5 spaces the browser will only put one there and ignores the rest so the "& nbsp;" is how you would add more than just one space<!--content-->Originally posted by 2bone <br />
<br />
Peg likes to keep useful stuff handy, on index cards & bits of notepaper, so that she can find it when she needs it...<br />
<br />
*rotfl* Actually, that's the one I was thinking of, but I wasn't sure if there was one here or not. I have the printout of it in a binder right on my desk. <br />
<br />
Peg<!--content-->Ah! Thanks guys!<!--content-->
 
Back
Top