Maintaining a blog is not a big deal. Most people know how to publish a post in a blog. I ever been using blogspot blogs for quiet a long time. Whenever we publish post, we can see the source code means html code for the posts. In blogspot we can see the html edit section also.
Some days before I was trying to publish a post regarding html code that gives a particular result. But whenever I tried to put that code in my post, it was showing the result. My aim was to show that particular html code group as a new post.
I know the result that will be getting after using the html code. But I want share the code with others by including Html Code with in a blog post. So what to Do? I know you people also may face this same problem.
So in the following section I am going to give you the very useful tip to Include Html Code Within a Blog Post
HTML Entities
HTML entities (also known as character entity references) enable you to use characters that aren’t supported by the document’s character encoding or your keyboard. For example, you can type © to output a copyright symbol.
You can also use numeric character references. Numeric character references can be defined with either a decimal or hexadecimal value (although decimal is more common). The numeric character reference for the copyright symbol is © (decimal) and © (hexadecimal).
A key benefit that numeric character references have over entities is that they can be used to specify any unicode character, whereas entities can only specify some.
Entity Example
Many web developers use entities for outputing HTML code to the browser (or at least, outputing one of the characters used by the HTML language).
Lets say you have a website about web design. And lets say you want to display the tag required for creating a horizontal rule 20% wide. Well, if you type the tag (<hr width=”20%” />) into your code, the browser is simply going to render it as it should be (rather than output the actual code example). Like this…
… you see, instead of displaying the code, the browser rendered the code.
What you should have typed in is this:
<hr width="50%" />
The < replaces the < and the > replaces the >.
| To do this… | Type this… | Or this… | Description |
| ‘ | ‘ | left single quote | |
| ’ | ’ | right single quote | |
| ‚ | ‚ | single low-9 quote | |
| “ | “ | left double quote | |
| ” | ” | right double quote | |
| „ | „ | double low-9 quote | |
| † | † | dagger | |
| ‡ | ‡ | double dagger | |
| ‰ | ‰ | per mill sign | |
| ‹ | ‹ | single left-pointing angle quote | |
| › | › | single right-pointing angle quote | |
| ♠ | ♠ | black spade suit | |
| ♣ | ♣ | black club suit | |
| ♥ | ♥ | black heart suit | |
| ♦ | ♦ | black diamond suit | |
| ★ | ★ | black star | |
| ☆ | ☆ | white star | |
| ‾ | ‾ | overline, = spacing overscore | |
| ← | ← | leftward arrow | |
| ↑ | ↑ | upward arrow | |
| → | → | rightward arrow | |
| ↓ | ↓ | downward arrow | |
| ™ | ™ | trademark sign | |
| �-  |
unused | ||
| 	 | horizontal tab | ||
| | line feed | ||
|   | space | ||
| ! | ! | exclamation mark | |
| “ | " | " | double quotation mark |
| # | # | number sign | |
| $ | $ | dollar sign | |
| % | % | percent sign | |
| & | & | & | ampersand |
| ‘ | ' | apostrophe | |
| ( | ( | left parenthesis | |
| ) | ) | right parenthesis | |
| * | * | asterisk | |
| + | + | plus sign | |
| , | , | comma | |
| - | - | hyphen | |
| . | . | period | |
| / | ⁄ | / | slash |
| 0 - 9 | 0- 9 |
digits 0-9 | |
| : | : | colon | |
| ; | ; | semicolon | |
| < | < | < | less-than sign |
| = | = | equals sign | |
| > | > | > | greater-than sign |
| ? | ? | question mark | |
| @ | @ | at sign | |
| A - Z | A- Z |
uppercase letters A-Z | |
| [ | [ | left square bracket | |
| \ | \ | backslash | |
| ] | ] | right square bracket | |
| ^ | ^ | caret | |
| _ | _ | horizontal bar (underscore) | |
| ` | ` | grave accent | |
| a - z | a- z |
lowercase letters a-z | |
| { | { | left curly brace | |
| | | | | vertical bar | |
| / | ⁄ | / | slash |
| ° | ° | ° | degree sign |
| ± | ± | ± | plus or minus |
| ² | ² | ² | superscript two |
| ³ | ³ | ³ | superscript three |
| ´ | ´ | ´ | acute accent |
| µ | µ | µ | micro sign |
| ¶ | ¶ | ¶ | paragraph sign |
| · | · | · | middle dot |
| ¸ | ¸ | ¸ | cedilla |
| ¹ | ¹ | ¹ | superscript one |
| º | º | º | masculine ordinal |
| » | » | right angle quote | |
| ¼ | ¼ | ¼ | one-fourth |
| ½ | ½ | ½ | one-half |
| ¾ | ¾ | ¾ | three-fourths |
| ¿ | ¿ | ¿ | inverted question mark |
Related posts:
- Cool Widgets for Your Blog
Widgets are a simple way to add some flare to... - Hack Facebook Tutorial
I see there are a lot of people who ask:... - Wordpress Theme for Adsense Optimized
As you know, one goal these people have in common... - Free Download UBD Moneymaker Theme (WP Premium)
The JohnChow’s theme designer (UniqueBlogDesign) has just recently released their... - Buka Private Photo Friendster (EXPIRED!)
>> Pertama-tama, buka profil friendster korban (dalam hal ini, saya...












December 13th, 2008 at 1:18 pm
very useful and nice explanation.
December 11th, 2008 at 12:25 pm
thanks, nice tutorial ..
love your blog!
December 7th, 2008 at 4:17 am
thanks for your info.
i’m always confused to make a tutorial post with a lot of code/script.