Free WebSchools.com

Google



Submit Article ForumsLive chat WebhostingSEO ToolsLink TO UsResources


HOME

HTML Basic

HTML Introduction
HTML Basic Tags
HTML Formatting

HTML Entities
HTML Links
HTML Frames
HTML Tables



HTML Lists
HTML Forms
HTML Images

HTML Background
HTML Colors




HTML Advanced
HTML Fonts
HTML Styles
HTML Head
HTML Meta

HTML Scripts
HTML Events





Html 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 entity references, or entities for short, provide a method of entering characters that cannot be expressed in the document's character encoding or that cannot easily be entered on a keyboard
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 (;).

Non-breaking Space

The most common character entity in HTML is the non-breaking space.

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; &#160;
< less than &lt; &#60;
> greater than &gt; &#62;
& ampersand &amp; &#38;
" quotation mark &quot; &#34;
' apostrophe  &apos; (does not work in IE) &#39;

Some Other Commonly Used Character Entities:

web hosting


iPower
Result Description Entity Name Entity 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;