Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Articles Thread, HTML Character Entities in HTML / XHTML; HTML Character Entities Some characters like the < character, have a special meaning in HTML, and therefore cannot be used ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=5554


Reply
LinkBack Thread Tools Display Modes
HTML Character Entities
 
 
The God Father
Developer's Avatar

Reply With Quote
 
Join Date: Jul 2008
Location: NDC
Posts: 5,425
28-10-2008, 06:44 PM
 
HTML Character Entities


Some characters like the < character, have a special meaning in HTML, and therefore cannot be used in the text.
To display a less than sign (<) in HTML, we have to use a character entity.
Character Entities

Some characters have a special meaning in HTML, like the less than sign (<) that defines the start of an HTML tag. If we want the browser to actually display these characters we must insert character entities in the HTML source.
A character entity has three parts: an ampersand (&), an entity name or a # and an entity number, and finally a semicolon (.
To display a less than sign in an HTML document we must write: &lt; or <
The advantage of using a name instead of a number is that a name is easier to remember. The disadvantage is that not all browsers support the newest entity names, while the support for entity numbers is very good in almost all browsers.
Note that the entities are case sensitive.
This example lets you experiment with character entities: Character Entities
Non-breaking Space

The most common character entity in HTML is the non-breaking space.
Normally HTML will truncate spaces in your text. If you write 10 spaces in your text HTML will remove 9 of them. To add spaces to your text, use the &nbsp; character entity.
The Most Common Character Entities:

Result Description Entity Name Entity Number non-breaking space &nbsp;   < less than &lt; < > greater than &gt; > & ampersand &amp; & " quotation mark &quot; " ' apostrophe &apos; (does not work in IE) ' Some Other Commonly Used Character Entities:

Result Description Entity Name Entity Number ¢ cent &cent; ¢ £ pound &pound; £ ¥ yen &yen; ¥ € euro &euro; € § section &sect; § © copyright &copy; © ® registered trademark &reg; ® × multiplication &times; × ÷ division &divide; ÷
__________________
I Love Walking In The Rain Cuz Nobody Know I'm Crying !!
 
 
 
Reply

Articles Thread, HTML Character Entities in HTML / XHTML; HTML Character Entities Some characters like the < character, have a special meaning in HTML, and therefore cannot be used ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=5554


Bookmarks

Tags
character, entities, html


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lesson : HTML Linking to E-Mail in HTML Tutorial Developer Articles 0 17-10-2008 09:14 PM
WoW Character BBCode Developer Mods for 3.7.x 0 23-09-2008 03:59 AM
Html 4.01 Developer Articles 0 03-09-2008 10:26 PM
What is HTML? Developer Articles 0 03-09-2008 10:24 PM
HTML in 1 day Developer Programming Languages 5 16-07-2008 11:23 PM