B.1 HTML Character Entities


To insert special characters into your document, use the icons in the Objects panel's Characters category, as shown in Figure B-1, or the Insert figs/u2192.gif Special Characters menu. (See Chapter 2 for details on using the Characters category of the Objects panel.)

Figure B-1. Objects panel's Character category and the Insert Other Category dialog box
figs/dwn_ab01.gif

Other special characters and foreign characters, such as umlauts and accents, are inserted using the Insert Other Character dialog box (shown in Figure B-1). Open the Insert Other Character dialog box using the Other Characters icon in the Objects panel or Insert figs/u2192.gif Special Characters figs/u2192.gif Other. If you use special characters frequently, Section 19.3.1.1 in Chapter 19 demonstrates how to add a custom character icon to the Objects panel.

If the built-in characters entities are insufficient, you can enter so-called HTML character entities in the Insert field of the Insert Other Character dialog box, as seen in Figure B-1 (or you can hand-edit the HTML code). The Entity column of Table B-1 shows three-digit HTML character entity codes (of the form &# nnn ; ) for commonly needed characters. For example, > represents the greater-than sign (>). Note the leading &# characters and the terminating ; character. Also note the zero used to pad numbers under 100 to three digits. If a more convenient name , such as > , exists for the character entity, it is shown in the Named Entity column. Notice that named entities start with & and end with ; but do not include a # symbol.

You don't always need to use an HTML character entity code to display a character, even though a code exists. Common characters, such as letters , numbers, !, and %, are displayed properly when entered directly into the Design pane of the Document window. Conversely, not all character entity codes are supported in all browsers. Dreamweaver displays unrecognized characters as a square box. Browsers typically display unrecognized characters literally. For example, Ž is displayed as a greater-than-or-equal-to sign in some browsers, but many browsers display it as "Ž".

The entities shown in Table B-1 work in the latest version of the major browsers (although the character displayed by the browser may depend on the font and language coding in use). Table B-1 groups characters according to their similarity. Tables of HTML character entity sorted by the entity number are available widely, including in Webmaster in a Nutshell , HTML/XHTML: The Definitive Guide , and XML in a Nutshell . However, many special characters are difficult to reproduce accurately in print, so you may notice errors in printed versions.

A complete table of HTML character entities, both for reference and for testing with different browsers, is available at http://www.dwian.com/. An extended discussion of HTML character entities is available at http://www.bbsinc.com/iso8859.html.

Table B-1. Commonly needed HTML character entities

Entity

Named entity

Symbol

Description

 

 

Invisible space

Nonbreaking space

©

©

Copyright

®

®

Registered trademark

™

 

TM

Trademark

“

 

"

Left double quotes (curly)

”

 

"

Right double quotes (curly)

"

"

"

Straight double quotes (also indicates inches)

'

 

'

Straight single quote or straight apostrophe (also indicates feet)

‘

 

`

Left single curly quote

’

 

'

Right single curly quote (curly apostrophe)

#

 

#

Hash mark

$

 

$

Dollar sign

&#162

¢

Cent sign

&#163

& pound ;

Pound (money)

&#165

¥

Yen (money)

&#128

&euro

See Figure B-1

Euro (money)

!

 

!

Exclamation point

%

 

%

Percent sign

&

&amp

&

Ampersand

<

<

<

Less-than sign

&#062;

&gt;

>

Greater-than sign

&#061;

 

=

Equals sign

&#247,

&divide;

Division sign

&#188;

&frac14;

1/4

Fraction one-fourth

&#189;

&frac12;

1/2

Fraction one-half

&#190;

&frac34;

1/3

Fraction three-fourths

&#042;

 

*

Asterisk

&#043;

 

+

Plus sign

&#177;

&plusmn;

Plus/minus sign (+/-)

&#045;

 

-

Hyphen or minus sign

&#173;

&shy;

-

Soft hyphen

&#150;

 

-

En dash

&#151;

 

Em dash

&#151;

 

_

Underscore

&#047;

 

/

Slash

&#092;

 

\

Backslash

&#040;

 

(

Left parenthesis

&#041;

 

)

Right parenthesis

&#091;

 

[

Left square bracket

&#093;

 

]

Right square bracket

&#123;

 

{

Left curly brace

&#125;

 

}

Right curly brace

&#149;

 

figs/u2022.gif

Bullet

&#183;

&middot;

Middle dot

&#185;

&sup1;

1

Superscript 1

&#178;

&sup2;

2

Superscript 2

&#179;

&sup3;

3

Superscript 3

&#176;

&deg;

Degree sign (temperature)



Dreamweaver in a Nutshell
Dreamweaver in a Nutshell
ISBN: B000C4SPTM
EAN: N/A
Year: 2005
Pages: 208

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net