Wednesday, January 4, 2012

What do you have to do to display a special character in such as (<) in an HTML document?

We must use character entities in the HTML source code.
What are the three parts of a character entity?
Result,Description,Entity Name
What is an entity name? What is an entity number?
Entity name is the code for the text you are attempting to write. 
What is better to use an entity name or an entity number?
Entity numbers is very good.
What is the most common character entity in HTML?
A common character entity used in HTML is the non-breaking space (&nbsp;).






ResultDescriptionEntity NameEntity Number

non-breaking space&nbsp;&#160;
<less than&lt;&#60;
>greater than&gt;&#62;
&ampersand&amp;&#38;
"quotation mark&quot;&#34;
'apostrophe &apos;&#39;


Some Other Commonly Used Character Entities:

ResultDescriptionEntity NameEntity Number
¢cent&cent;&#162;
£pound&pound;&#163;
¥yen&yen;&#165;
§section&sect;&#167;
©copyright&copy;&#169;
®registered trademark&reg;&#174;
×multiplication&times;&#215;
÷division&divide;&#247

No comments:

Post a Comment