News:

This week IPhone 15 Pro winner is karn
You can be too a winner! Become the top poster of the week and win valuable prizes.  More details are You are not allowed to view links. Register or Login 

Main Menu

HTML help - Special Characters

Started by ben2ong2, October 03, 2006, 06:05:34 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

ben2ong2

The keyboard contains only alphabet, numbers and some punctuation marks. What if you wanted to include a © symbol on your pages like I have (scroll down this page, and you shall find this symbol). Such symbols are special characters called Character Entities, which can be displayed in HTML pages using a certain notation.


This notation can be of two types:

&entity-name-shortform;
&#number;
Thus, the copyright sign can be displayed by © or © Here are a few common characters which you might need for your pages:

I had mentioned at the beginning that HTML is case insensitive and so, it doesn't make a difference if you write <FONT>, <font>, <Font> or <FoNt> (... hope you get the general idea!). Character entities, however, are case sensitive- &nbsp; will work but &NBSP; won't. Try it out yourself.



Name Notation            Number Notation                    Special Character
&amp;                             &#38;                                      &
&lt;                                 &#60;                                      <
&gt;                                 &#62;                                      >
&trade;                            ™                                      â,,¢
&nbsp;                                                            Empty space
&cent;                              ¢                                      ¢
&pound;                             £                                      £
&yen;                               ¥                                       Â¥
&copy;                              ©                                      ©
&reg;                                 ®                                     Â®
&deg;                                °                                       Â°
&frac14;                            ¼                                       Â¼
&frac12;                            ½                                         Â½
&frac34;                            ¾                                        ¾

The entire list of character entities can be found here.

Remember, all tags in HTML are enclosed by < and > signs. To display these signs, you have to use their special character notations. Thus, to display <HTML>, you have to write the < and > signs in their special notations as &lt;HTML&gt;.



You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login