This small document is for testing the presentation of the em dash character in various ways. Viewed on a browser, this document only shows what things look like on that particular browser, with its particular settings. (See the document On the use of some MS Windows characters in HTML.)
| notation | result | comments |
|---|---|---|
— | — | a correct way,
which does not often work yet |
— | — | a correct way,
which does not often work yet |
— | | undefined character
reference, which may cause anything
(even a dash sometimes) |
| raw byte 151 | — | a correct way, assuming
that the document is specified to be in
ISO-8859-1-Windows-3.1-Latin-1 encoding |
<IMG SRC="mdash.gif" ALT="--">
|
| could be ridiculously small or extravagantly large (in proportion to text font size) |
| an interesting idea,
but looks odd if the overstrike appears above or below the hyphens | |
<STRIKE> </STRIKE>
| looks
better but is illogical; any
software which looks at the real characters will see no-break
spaces, not a hyphen | |
- (a normal hyphen) | - | well, it's just a hyphen, so it isn't that esthetic, but it works universally |
-- (two hyphens) | -- | an alternative to a single hyphen; often regarded as the best way to deal with the problem |
<TT>-</TT>
| - | This method uses a normal hyphen but tries to make browsers display in a font where it looks wider than a hyphen in a normal font. |