There is a most recent version of this.

Contents

  1. Contents
  2. Character References
  3. RDFa in XHTML
  4. XHTML 1.1 and Basic 1.1
  5. HTML 4.01
  6. Historic

Character References

Encoded characters are prefered over references.

☺ and ☹ (Smiley & Frownie)
☺ and ☹
“ and ” (Real Quotes)
“ and ”
’ (Apostrophie)
’ (‘ is the complement (‘)
… (Elipsis)
…
‐ (Real Hyphen)
‐
‑ (Non-Breaking Hyphen)
‑
− (Real Minus Sign)
−
– (EN Dash (A range (a "to" substitute)))
–
— (EM Dash (Comma like))
—
✓ (Check)
✓
→ (Arrows)
→
  (No-break Space)
 
​ (Zero-width Space)
​
é (acute e)
é
ü (u with diaeresis (umlaut))
ü
‽ (Interobang)
‽
¼, ½, ¾ (Quarters (Vulgar Fractions))
¼, ½, ¾
⅛, ⅜, ⅝, ⅞; (Eighths (Vulgar Fractions))
⅛, ⅜, ⅝, ⅞
⅓, ⅔ (Thirds (Vulgar Fractions))
ࡩ, ⅔
⅙, ⅚ (Sixths (Vulgar Fractions))
⅙, ⅚
⅕, ⅖, ⅗, ⅘ (Fifths (Vulgar Fractions))
⅕, ⅖, ⅗, ⅘
° (Degrees)
°
℉, ℃ (Degrees Fahrenheit and Celsius)
℉, ℃
Ⅰ, Ⅴ, Ⅹ, Ⅼ, Ⅽ, Ⅾ, Ⅿ (Roman Numerals (Upper Case))
Ⅰ, Ⅴ, Ⅹ, Ⅼ, Ⅽ, Ⅾ, Ⅿ
ⅰ, ⅴ, ⅹ, ⅼ, ⅽ, ⅾ, ⅿ (Roman Numerals (Lower Case))
ⅰ, ⅴ, ⅹ, ⅼ, ⅽ, ⅾ, ⅿ
℅ (Care Of)
℅
฿ (Thai Baht)
฿
₭ (Laos Kip)
₭

RDFa in XHTML

When you feel like including metadata…

<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" version="XHTML+RDFa 1.0" xml:lang="en-us">

XHTML 1.1 and Basic 1.1

Real XML applications should start with one of the following headings.

Basic
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
Full
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">

HTML 4.01

If we have to…

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">

Historic

The notes on tips and CSS (from 2004-06-29) are no longer here because I don't need to cheat (I now understand them) or implementations have caught up with the spec (no need for the hacks).