Quantcast
Channel: The Redhead Riter
Viewing all articles
Browse latest Browse all 9

Blank Space HTML – How To Create And Use The Non-Breaking Space Code

$
0
0

     

No, Bella did not start typing on the keyboard again.

  is the HTML code for a blank space or a non-breaking space.

Are you thoroughly confused now? Let me start from the beginning.

blank space html
 

What Is “ ” And A Non-Breaking Space?

HTML is the abbreviation for Hypertext Markup Language which is a standardized system for tagging text files to create a specific font, color, graphic, and to create hyperlink effects on World Wide Web pages.

Sometimes it is necessary while coding a page to put in a blank space so that everything lines up correctly. That’s where   becomes quite handy because   is the HTML code that represents a blank space.

This is how the code might look if it were used as a double-spaced indention in front of a paragraph:

  Paragraph sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence.

This is how it would appear to the reader of the website:

  Paragraph sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence.

Can you tell that there is some space in front of the word “Paragraph”? If not, it proves my point about why it isn’t a good idea to use the blank space code of   as a means to indent a paragraph. Some browsers scrunch multiple blank space HTML codes of   together which defeats the whole purpose of using them!
 
 

Best Use For “ ” As A Non-Breaking Blank Space

I have found that one of the best uses of the non-breaking blank space is to prevent the separation of words. For instance, if I type “6 ft” or “1 mi”, I definitely don’t want the “6″ and “ft” or the “1″ and “mi” to be separated on different lines of a paragraph. If the “6 ft” hits the end of a sentence, I don’t want the “ft” to drop to the next line. To prevent this from happening, I would type “6 ft” and it would appear as “6 ft” to the reader without separating the characters from each other on two different lines even if it hit the end of a sentence.

Personally, I find that using   to keep important words together as the best usage of the HTML code.

Now you know that   is the HTML code for a non-breaking blank space. When you least expect it, you will probably find a use for the code and I’m sure it will pop up in conversation quite casually.

For instance, when you are sitting around with your non-blogging friends eating a casual lunch, I don’t think you will say, “I’m so excited that I learned that “ ” is the HTML code for a non-breaking blank space and it is going to help me never have words separate at the end of a sentence again!” But when you are sitting in front of your computer monitor typing like a fiend, some day you will have a couple words that you want to stay stuck together. That’s when the light bulb will go off and you’ll remember that   is the HTML code for a non-breaking blank space.

I know…this was a totally exciting post! In all honesty,   is some of the first HTML code I learned and I really do get all pumped up talking about it.

=whooooop=

=whooooop=

=whooooop=

That was your Nerd Alert warning.

 

 

 

 


Viewing all articles
Browse latest Browse all 9

Latest Images

Trending Articles





Latest Images