REC-html32-19970114
122 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<title>HTML 3.2 Reference Specification</title>
<body bgcolor="#FFF6F0"
background="recbg.jpg"
text="#000000"
link="#C00000"
vlink="#800000" alink="#FF00FF">
<!--basefont size=3-->
<h2 align=right><A HREF="http://www.w3.org/"><img align=left border=0 alt="W3C:"
width=72 height=48
src="http://www.w3.org/pub/WWW/Icons/WWW/w3c_home"></A>
REC-html32</h2>
<h1 align=center>HTML 3.2 Reference Specification</h1>
<h3 align=center>W3C Recommendation <i>14-Jan-1997</i></h3>
<p>Author: <i><a href="http://www.w3.org/People/Raggett">Dave Raggett</a></i>
<tt><<a href="mailto:dsr@w3.org">dsr@w3.org</a>></tt></p>
<hr>
<h3>Status of this document</h3>
<p>This document has been reviewed by W3C members and other interested
parties and has been endorsed by the Director as a W3C Recommendation.
It is a stable document and may be used as reference material or cited
as a normative reference from another document. W3C's role in making
the Recommendation is to draw attention to the specification and to
promote its widespread deployment. This enhances the functionality
and interoperability of the Web.
<p>A list of current W3C Recommendations and other technical documents
can be found at
<a href="http://www.w3.org/pub/WWW/TR/">http://www.w3.org/pub/WWW/TR/</A>.
<hr>
<h2>Abstract</h2>
<p>The HyperText Markup Language (HTML) is a simple markup language used
to create hypertext documents that are portable from one platform to
another. HTML documents are SGML documents with generic semantics that
are appropriate for representing information from a wide range of
applications. This specification defines HTML version 3.2. HTML 3.2 aims
to capture recommended practice as of early '96 and as such to be used
as a replacement for HTML 2.0 (<a href="#refs">RFC 1866</a>).
<hr>
<h2>Contents</h2>
<ul>
<li><a href="#intro">Introduction to HTML 3.2</a>
<li><a href="#sgml">HTML as an SGML application</a>
<li><a href="#html">The Structure of HTML documents</a>
<li><a href="#head">The HEAD element and its children</a>
<li><a href="#body">The BODY element and its children</a>
<li><a href="#catalog">Sample SGML Open Catalog for HTML 3.2</a>
<li><a href="#sgmldecl">SGML Declaration for HTML 3.2</a>
<li><a href="#dtd">HTML 3.2 Document Type Definition</a>
<li><a href="#latin1">Character Entities for ISO Latin-1</a>
<li><a href="#charset">Table of printable Latin-1 Character codes</a>
<li><a href="#acks">Acknowledgements</a>
<li><a href="#refs">Further Reading ...</a>
</ul>
<hr>
<h2><a name=intro>Introduction to HTML 3.2</a></h2>
<p>HTML 3.2 is W3C's specification for HTML, developed in early `96
together with vendors including IBM, Microsoft, Netscape Communications
Corporation, Novell, SoftQuad, Spyglass, and Sun Microsystems. HTML 3.2
adds widely deployed features such as tables, applets and text flow
around images, while providing full backwards compatibility with the
existing standard HTML 2.0.
<p>W3C is continuing to work with vendors on extensions for
accessibility features, multimedia objects, scripting, style sheets,
layout, forms, math and internationalization. W3C plans on incorporating
this work in further versions of HTML.
<h3><a name=sgml>HTML as an SGML Application</a></h3>
<p>HTML 3.2 is an SGML application conforming to International Standard
ISO 8879 -- Standard Generalized Markup Language. As an SGML
application, the syntax of conforming HTML 3.2 documents is defined by
the combination of the <a href="#sgmldecl">SGML declaration</a> and the
<a href="#dtd">document type definition</a> (DTD). This specification
defines the intended interpretation of HTML 3.2 elements, and places
further constraints on the permitted syntax which are otherwise
inexpressible in the DTD.
<p>The SGML rules for record boundaries are tricky. In particular, a
record end immediately following a start tag should be discarded. For
example:
<pre><P>
Text</pre>
<p>
is equivalent to:</p>
<pre><P>Text</pre>
<p>Similarly, a record end immediately preceding an end tag should be
discarded. For example:
<pre>Text
</P></pre>
<p>is equivalent to:
</p>
<pre>Text</P></pre>
<p>Except within literal text (e.g. the <samp>PRE</samp> element), HTML
treats contiguous sequences of white space characters as being
equivalent to a single space character (ASCII decimal 32). These rules
allow authors considerable flexibility when editing the marked-up text
directly. Note that future revisions to HTML may allow for the
interpretation of the horizontal tab character (ASCII decimal 9) with
respect to a tab rule defined by an associated style sheet.
<p>SGML entities in PCDATA content or in CDATA attributes are expanded
by the parser, e.g. <samp>&#233;</samp> is expanded to the ISO
Latin-1 character decimal 233 (a lower case letter e with an acute
accent). This could also have been written as a named character entity,
e.g. <samp>&eacute;</samp>. The & character can be included
in its own right using the named character entity <samp>&amp;</samp>.
<p>HTML allows CDATA attributes to be unquoted provided the attribute
value contains only letters (a to z and A to Z), digits (0 to 9),
hyphens (ASCII
decimal 45) or, periods (ASCII decimal 46). Attribute values can
be quoted using double or single quote marks (ASCII decimal 34 and
39 respectively). Single quote marks can be included within the
attribute value when the value is delimited by double quote marks,
and vice versa.
<p>Note that some user agents require attribute minimisation for the
following attributes: <samp>COMPACT</samp>, <samp>ISMAP</samp>,
<samp>CHECKED</samp>, <samp>NOWRAP</samp>, <samp>NOSHADE</samp> and
<samp>NOHREF</samp>. These user agents don't accept syntax such as
<samp>COMPACT=COMPACT</samp> or <samp>ISMAP=ISMAP</samp> although this
is legitimate according to the HTML 3.2 DTD.
<p>The SGML declaration and the DTD for use with HTML 3.2 are given in
appendices. Further guidelines for parsing HTML are given in
<a href="#refs">WD-html-lex</a>.
<hr>
<h3><a name=html>The Structure of HTML documents</a></h3>
<p>HTML 3.2 Documents start with a <!DOCTYPE> declaration
followed by an HTML element containing a <a href="#head"><samp>HEAD</samp></a>
and then a <a href="#body"><samp>BODY</samp></a> element:
<pre> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>A study of population dynamics</TITLE>
<i>... other head elements</i>
</HEAD>
<BODY>
<i>... document body</i>
</BODY>
</HTML></pre>
<P>In practice, the <samp>HTML</samp>, <a href="#head"><samp>HEAD</samp></a>
and <a href="#body"><samp>BODY</samp></a> start and end tags can be omitted
from the markup as these can be inferred in all cases by parsers conforming
to the <a href="#dtd">HTML 3.2 DTD</a>.
<p>Every conforming HTML 3.2 document <b>must</b> start with the
<samp><!DOCTYPE></samp> declaration that is needed to distinguish
HTML 3.2 documents from other versions of HTML. The HTML specification
is not concerned with storage entities. As a result, it is not required
that the document type declaration reside in the same storage entity
(i.e. file). A Web site may choose to dynamically prepend HTML files
with the document type declaration if it is known that all such HTML
files conform to the HTML 3.2 specification.
<p>Every HTML 3.2 document must also include the descriptive title
element. A minimal HTML 3.2 document thus looks like:
<pre> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<TITLE>A study of population dynamics</TITLE></pre>
<p><i>Note: the word "Final" replaces "Draft" now that the HTML 3.2
specification has been ratified by the W3C member organizations.</i>
<hr>
<h2><a name=head>The HEAD element</a></h2>
<p>This contains the document head, but you can always omit both
the start and end tags for <samp>HEAD</samp>. The contents of the
document head is an unordered collection of the following elements:
<ul>
<li><a href="#title">The TITLE element</a>
<li><a href="#script">The STYLE element</a>
<li><a href="#script">The SCRIPT element</a>
<li><a href="#isindex">The ISINDEX element</a>
<li><a href="#base">The BASE element</a>
<li><a href="#meta">The META element</a>
<li><a href="#link">The LINK element</a>
</ul>
<pre><!ENTITY % head.content "TITLE & ISINDEX? & BASE?">
<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK">
<!ELEMENT HEAD O O (%head.content) +(%head.misc)></pre>
<p>The %head.misc entity is used to allow the associated elements
to occur multiple times at arbitrary positions within the HEAD.
The following elements can be part of the document head:
<dl>
<dt><b><a href="#title">TITLE</a></b> defines the document title,
and is always needed.
<dt><b><a href="#isindex">ISINDEX</a></b> for simple keyword searches,
see <samp>PROMPT</samp> attribute.
<dt><b><a href="#base">BASE</a></b> defines base URL for resolving
relative URLs.
<dt><b><a href="#script">SCRIPT</a></b> reserved for future use
with scripting languages.
<dt><b><a href="#style">STYLE</a></b> reserved for future use
with style sheets.
<dt><b><a href="#meta">META</a></b> used to supply meta info as
name/value pairs.
<dt><b><a href="#link">LINK</a></b> used to define relationships
with other documents.
</dl>
<p><samp>TITLE</samp>, <samp>SCRIPT</samp> and <samp>STYLE</samp> are
containers and require both start and end tags. The other elements are
not containers so that end tags are forbidden. Note that conforming
browsers won't render the contents of <samp>SCRIPT</samp> and
<samp>STYLE</samp> elements.
<h3><a name=title>TITLE</a></h3>
<pre><!ELEMENT TITLE - - (#PCDATA)* -(%head.misc)></pre>
<p>Every HTML 3.2 document <b>must</b> have exactly one
<samp>TITLE</samp> element in the document's <samp>HEAD</samp>. It
provides an advisory title which can be displayed in a user agent's
window caption etc. The content model is PCDATA. As a result, character
entities can be used for accented characters and to escape special
characters such as & and <. Markup is not permitted in the
content of a <samp>TITLE</samp> element.
<p>Example TITLE element:
<pre> <TITLE>A study of population dynamics</TITLE></pre>
<h3><a name=style>STYLE</a> and <a name=script>SCRIPT</a></h3>
<pre>
<!ELEMENT STYLE - - CDATA -- placeholder for style info -->
<!ELEMENT SCRIPT - - CDATA -- placeholder for script statements -->
</pre>
<p>These are place holders for the introduction of style sheets and
client-side scripts in future versions of HTML. User agents should hide
the contents of these elements.
<p>These elements are defined with CDATA as the content type. As a
result they may contain only SGML characters. All markup characters or
delimiters are ignored and passed as data to the application, except for
ETAGO ("</") delimiters followed immediately by a name character
[a-zA-Z]. This means that the element's end-tag (or that of an element
in which it is nested) is recognized, while an error occurs if the ETAGO
is invalid.
<h3><a name=isindex>ISINDEX</a></h3>
<pre> <!ELEMENT ISINDEX - O EMPTY>
<!ATTLIST ISINDEX
prompt CDATA #IMPLIED -- prompt message --></pre>
<p>The <samp>ISINDEX</samp> element indicates that the user agent should
provide a single line text input field for entering a query string.
There are no restrictions on the number of characters that can be
entered. The <samp>PROMPT</samp> attribute can be used to specify a
prompt string for the input field, e.g.
<pre> <ISINDEX PROMPT="Search Phrase"></pre>
<p>The semantics for <samp>ISINDEX</samp> are currently well defined
only when the base URL for the enclosing document is an HTTP URL.
Typically, when the user presses the enter (return) key, the query
string is sent to the server identified by the base URL for this
document. For example, if the query string entered is "ten green apples"
and the base URL is:
<pre> http://www.acme.com/</pre>
<p>then the query generated is:
<pre> http://www.acme.com/?ten+green+apples"</pre>
<p>Note that space characters are mapped to "+" characters and that
normal URL character escaping mechanisms apply. For further details see
the <a href="#refs">HTTP</a> specification.
<p><i><b>Note</b> in practice, the query string is resticted to Latin-1
as there is no current mechanism for the URL to specify a character
set for the query.</i>
<h3><a name=base>BASE</a></h3>
<pre> <!ELEMENT BASE - O EMPTY>
<!ATTLIST BASE
href %URL #REQUIRED
></pre>
<p>The <samp>BASE</samp> element gives the base URL for dereferencing
relative URLs, using the rules given by the URL specification, e.g.
<pre> <BASE href="http://www.acme.com/intro.html">
...
<IMG SRC="icons/logo.gif"></pre>
<p>The image is deferenced to
<pre> http://www.acme.com/icons/logo.gif</pre>
<p>In the absence of a <samp>BASE</samp> element the document URL should
be used. Note that this is not necessarily the same as the URL used to
request the document, as the base URL may be overridden by an HTTP
header accompanying the document.
<h3><a name=meta>META</a></h3>
<pre>
<!ELEMENT META - O EMPTY -- Generic Metainformation -->
<!ATTLIST META
http-equiv NAME #IMPLIED -- HTTP response header name --
name NAME #IMPLIED -- metainformation name --
content CDATA #REQUIRED -- associated information --
>
</pre>
<p>The <samp>META</samp> element can be used to include name/value pairs
describing properties of the document, such as author, expiry date,
a list of key words etc. The <samp>NAME</samp> attribute specifies the
property name while the <samp>CONTENT</samp> attribute specifies the
property value, e.g.
<pre> <META NAME="Author" CONTENT="Dave Raggett"></pre>
<p>The <samp>HTTP-EQUIV</samp> attribute can be used in place of the
<samp>NAME</samp> attribute and has a special significance when
documents are retrieved via the Hypertext Transfer Protocol (HTTP). HTTP
servers may use the property name specified by the HTTP-EQUIV attribute
to create an RFC 822 style header in the HTTP response. This can't be
used to set certain HTTP headers though, see the HTTP specification for
details.
<pre> <META HTTP-EQUIV="Expires" CONTENT="Tue, 20 Aug 1996 14:25:27 GMT"></pre>
<p>will result in the HTTP header:
<pre> Expires: Tue, 20 Aug 1996 14:25:27 GMT</pre>
<p>This can be used by caches to determine when to fetch a fresh copy
of the associated document.
<h3><a name=link>LINK</a></h3>
<p><samp>LINK</samp> provides a media independent method for defining
relationships with other documents and resources. <samp>LINK</samp> has
been part of HTML since the very early days, although few browsers as
yet take advantage of it (most still ignore <samp>LINK</samp> elements).
<p>LINK elements can be used <em>in principle</em>:
<ol type="a">
<li>for document specific navigation toolbars or menus
<li>to control how collections of
HTML files are rendered into printed documents
<li>for linking associated resources such as
style sheets and scripts
<li>to provide alternative forms of the current document
</ol>
<pre>
<!ELEMENT LINK - O EMPTY>
<!ATTLIST LINK
href %URL #IMPLIED -- URL for linked resource --
rel CDATA #IMPLIED -- forward link types --
rev CDATA #IMPLIED -- reverse link types --
title CDATA #IMPLIED -- advisory title string --
>
</pre>
<dl>
<dt><b>href</b>
<dd>Specifies a URL designating the linked resource.
<dt><b>rel</b>
<dd>The forward relationship also known as the "link type". It specifies
a named relationship from the enclosing document to the resource
specified by the <samp>HREF</samp> attribute. HTML link relationships
are as yet unstandardized, although some conventions have been
established.
<dt><b>rev</b>
<dd>This defines a reverse relationship. A link from document A to
document B with <samp>REV=<em>relation</em></samp> expresses the same
relationship as a link from B to A with <samp>REL=<em>relation</em></samp>.
<samp>REV=made</samp> is sometimes used to identify the document author,
either the author's email address with a mailto URL, or a link to the
author's home page.
<dt><b>title</b>
<dd>An advisory title for the linked resource.
</dl>
<p>Here are some proposed relationship values:
<dl>
<dt><samp>rel=top</samp>
<dd>The link references the top of a hierarchy, e.g.
the first or cover page in a collection.
<dt><samp>rel=contents</samp>
<dd>The link references a document serving as a table of contents.
<dt><samp>rel=index</samp>
<dd>The link references a document providing an index
for the current document.
<dt><samp>rel=glossary</samp>
<dd>The link references a document providing a glossary
of terms that are relevant to the current document.
<dt><samp>rel=copyright</samp>
<dd>The link references a copyright statement for
the current document.
<dt><samp>rel=next</samp>
<dd>The link references the next document to visit in a guided tour.
It can be used, for example, to preload the next page.
<dt><samp>rel=previous</samp>
<dd>The link references the previous document in a guided tour.
<dt><samp>rel=help</samp>
<dd>The link references a document offering help, e.g. describing
the wider context and offering further links to relevant documents.
This is aimed at reorienting users who have lost their way.
<dt><samp>rel=search</samp>
<dd>The link references a page for searching material related
to a collection of pages
</dl>
<p>Example <samp>LINK</samp> elements:
<pre> <LINK REL=Contents HREF=toc.html>
<LINK REL=Previous HREF=doc31.html>
<LINK REL=Next HREF=doc33.html>
<LINK REL=Chapter REV=Contents HREF=chapter2.html></pre>
<hr>
<h2><a name=body>The BODY element</a></h2>
<p>This contains the document body. Both start and end tags for
<samp>BODY</samp> may be omitted. The body can contain a wide range
of elements:
<ul>
<li><a href="#headings">Headings (H1 - H6)</a>
<li><a href="#address">The ADDRESS element</a>
<li><a href="#block">Block level Elements</a>
<li><a href="#textlevel">Text level elements</a>
</ul>
<p>The key attributes are: <samp>BACKGROUND</samp>,
<samp>BGCOLOR</samp>, <samp>TEXT</samp>, <samp>LINK</samp>,
<samp>VLINK</samp> and <samp>ALINK</samp>. These can be used to set a
repeating background image, plus background and foreground colors for
normal text and hypertext links.
<pre><!ENTITY % body.content "(%heading | %text | %block | ADDRESS)*">
<!ENTITY % color "CDATA" -- a color specification: #HHHHHH @@ details? -->
<!ENTITY % body-color-attrs "
bgcolor %color #IMPLIED
text %color #IMPLIED
link %color #IMPLIED
vlink %color #IMPLIED
alink %color #IMPLIED
">
<!ELEMENT BODY O O %body.content>
<!ATTLIST BODY
background %URL #IMPLIED -- texture tile for document background --
%body-color-attrs; -- bgcolor, text, link, vlink, alink --
></pre>
<p>Example:
<pre> <body bgcolor=white text=black link=red vlink=maroon alink=fuchsia></pre>
<dl>
<dt><b>bgcolor</b>
<dd>Specifies the background color for the document body.
See below for the syntax of color values.
<dt><b>text</b>
<dd>Specifies the color used to stroke the document's text.
This is generally used when you have changed the background
color with the <samp>BGCOLOR</samp> or <samp>BACKGROUND</samp> attributes.
<dt><b>link</b>
<dd>Specifies the color used to stroke the text for unvisited hypertext
links.
<dt><b>vlink</b>
<dd>Specifies the color used to stroke the text for visited hypertext
links.
<dt><b>alink</b>
<dd>Specifies the highlight color used to stroke the text for hypertext
links at the moment the user clicks on the link.
<dt><b>background</b>
<dd>Specifies a URL for an image that will be used to tile the document
background.
</dl>
<p><a name=colors>Colors</a> are given in the <a href="#refs">sRGB</a>
color space as hexadecimal numbers (e.g. <samp>COLOR="#C0FFC0"</samp>),
or as one of 16 widely understood color names. These colors were
originally picked as being the standard 16 colors supported with the
Windows VGA palette.</p>
<table align=center width="80%" border=0 cellspacing=10 cellpadding=0>
<caption><b>Color names and sRGB values</b><br></caption>
<tr><td width=16><img src="images/black.gif"><td>Black = "#000000"
<td width=16><img src="images/green.gif"><td>Green = "#008000"<br></tr>
<tr><td width=16><img src="images/silver.gif"><td>Silver = "#C0C0C0"
<td width=16><img src="images/lime.gif"><td>Lime = "#00FF00"<br></tr>
<tr><td width=16><img src="images/gray.gif"><td>Gray = "#808080"
<td width=16><img src="images/olive.gif"><td>Olive = "#808000"<br></tr>
<tr><td width=16><img src="images/white.gif"><td>White = "#FFFFFF"
<td width=16><img src="images/yellow.gif"><td>Yellow = "#FFFF00"<br></tr>
<tr><td width=16><img src="images/maroon.gif"><td>Maroon = "#800000"
<td width=16><img src="images/navy.gif"><td>Navy = "#000080"<br></tr>
<tr><td width=16><img src="images/red.gif"><td>Red = "#FF0000"
<td width=16><img src="images/blue.gif"><td>Blue = "#0000FF"<br></tr>
<tr><td width=16><img src="images/purple.gif"><td>Purple = "#800080"
<td width=16><img src="images/teal.gif"><td>Teal = "#008080"<br></tr>
<tr><td width=16><img src="images/fuchsia.gif"><td>Fuchsia = "#FF00FF"
<td width=16><img src="images/aqua.gif"><td>Aqua = "#00FFFF"<br></tr>
</table>
<h3><a name=level>Block and Text level elements</a></h3>
<p>Most elements that can appear in the document body fall into one of
two groups: block level elements which cause paragraph breaks, and text
level elements which don't. Common block level elements include
<samp>H1</samp> to <samp>H6</samp> (headers), <samp>P</samp>
(paragraphs) <samp>LI</samp> (list items), and <samp>HR</samp>
(horizontal rules). Common text level elements include <samp>EM</samp>,
<samp>I</samp>, <samp>B</samp> and <samp>FONT</samp> (character
emphasis), <samp>A</samp> (hypertext links), <samp>IMG</samp> and
<samp>APPLET</samp> (embedded objects) and <samp>BR</samp> (line
breaks). Note that block elements generally act as containers for text
level and other block level elements (excluding headings and address
elements), while text level elements can only contain other text level
elements. The exact model depends on the element.
<h3><a name=headings>Headings</a></h3>
<pre>
<!--
There are six levels of headers from H1 (the most important)
to H6 (the least important).
-->
<!ELEMENT ( %heading ) - - (%text;)*>
<!ATTLIST ( %heading )
align (left|center|right) #IMPLIED
>
</pre>
<p><samp>H1</samp>, <samp>H2</samp>, <samp>H3</samp>, <samp>H4</samp>,
<samp>H5</samp> and <samp>H6</samp> are used for document headings. You
always need the start and end tags. <samp>H1</samp> elements are more
important than <samp>H2</samp> elements and so on, so that
<samp>H6</samp> elements define the least important level of headings.
More important headings are generally rendered in a larger font than
less important ones. Use the optional <samp>ALIGN</samp> attribute to
set the text alignment within a heading, e.g.
<pre> <H1 ALIGN=CENTER> <i>... centered heading ...</i> </H1></pre>
<p>The default is left alignment, but this can be overridden by an
enclosing <a href="#div"><samp>DIV</samp></a> or <a
href="#center"><samp>CENTER</samp></a> element.
<h3><a name=address>ADDRESS</a></h3>
<pre> <!ENTITY % address.content "((%text;) | P)*">
<!ELEMENT ADDRESS - - %address.content></pre>
<p>The <samp>ADDRESS</samp> element requires start and end tags, and
specifies information such as authorship and contact details for the
current document. User agents should render the content with
paragraph-breaks before and after. Note that the content is restricted
to paragraphs, plain text and text-like elements as defined by the %text
entity.
<P>Example:
<PRE><ADDRESS>
Newsletter editor<BR>
J.R. Brown<BR>
8723 Buena Vista, Smallville, CT 01234<BR>
Tel: +1 (123) 456 7890
</ADDRESS></PRE>
<h3><a name=block>Block elements</a></h3>
<dl>
<dt><b><a href="#para">P</a></b> <i>paragraphs</i>
<dd>The paragraph element requires a start tag, but the end tag can
always be omitted. Use the <samp>ALIGN</samp> attribute to set the text
alignment within a paragraph, e.g. <samp><P ALIGN=RIGHT></samp>
<dt><b><a href="#ul">UL</a></b> <i>unordered lists</i>
<dd>These require start and end tags, and contain one or more
<samp>LI</samp> elements representing individual list items.
<dt><b><a href="#ol">OL</a></b> <i>ordered (i.e. numbered) lists</i>
<dd>These require start and end tags, and contain one or more
<samp>LI</samp> elements representing individual list items.
<dt><b><a href="#dl">DL</a></b> <i>definition lists</i>
<dd>These require start and end tags and contain <samp>DT</samp>
elements that give the terms, and <samp>DD</samp> elements that give
corresponding definitions.
<dt><b><a href="#pre">PRE</a></b> <i>preformatted text</i>
<dd>Requires start and end tags. These elements are rendered with a
monospaced font and preserve layout defined by whitespace and line
break characters.
<dt><b><a href="#div">DIV</a></b> <i>document divisions</i>
<dd>Requires start and end tags. It is used with the <samp>ALIGN</samp>
attribute to set the text alignment of the block elements it contains.
<samp>ALIGN</samp> can be one of <samp>LEFT</samp>, <samp>CENTER</samp>
or <samp>RIGHT</samp>.
<dt><b><a href="#center">CENTER</a></B> <i>text alignment</i>
<dd>Requires start and end tags. It is used to center text lines
enclosed by the <samp>CENTER</samp> element. See <samp>DIV</samp>
for a more general solution.
<dt><b><a href="#bq">BLOCKQUOTE</a></b> <i>quoted passage</i>
<dd>Requires start and end tags. It is used to enclose extended
quotations and is typically rendered with indented margins.
<dt><b><a href="#form">FORM</a></b> <i>fill-out forms</i>
<dd>Requires start and end tags. This element is used to define
a fill-out form for processing by HTTP servers. The attributes
are <samp>ACTION</samp>, <samp>METHOD</samp> and <samp>ENCTYPE</samp>.
Form elements can't be nested.
<dt><b><a href="#isindex">ISINDEX</a></b> <i>primitive HTML forms</i>
<dd>Not a container, so the end tag is forbidden. This predates
<samp>FORM</samp> and is used for simple kinds of forms which have a
single text input field, implied by this element. A single
<samp>ISINDEX</samp> can appear in the document head or body.
<dt><b><a href="#hr">HR</a></b> <i>horizontal rules</i>
<dd>Not a container, so the end tag is forbidden. attributes are
<samp>ALIGN</samp>, <samp>NOSHADE</samp>, <samp>SIZE</samp> and
<samp>WIDTH</samp>.
<dt><b><a href="#table">TABLE</a></b> <i>can be nested</i>
<dd>Requires start and end tags. Each table starts with an optional
<samp>CAPTION</samp> followed by one or more <samp>TR</samp> elements
defining table rows. Each row has one or more cells defined by
<samp>TH</samp> or <samp>TD</samp> elements. attributes for
<samp>TABLE</samp> elements are <samp>WIDTH</samp>, <samp>BORDER</samp>,
<samp>CELLSPACING</samp> and <samp>CELLPADDING</samp>.
</dl>
<hr>
<h3><a name=para>Paragraphs</a></h3>
<pre> <!ELEMENT P - O (%text)*>
<!ATTLIST P
align (left|center|right) #IMPLIED
></pre>
<p>The <samp>P</samp> element is used to markup paragraphs. It is a
container and requires a start tag. The end tag is optional as it can
always be inferred by the parser. User agents should place paragraph
breaks before and after <samp>P</samp> elements. The rendering is user
agent dependent, but text is generally wrapped to fit the space
available.
<p>Example:
<pre> <P>This is the first paragraph.
<P>This is the second paragraph.</pre>
<p>Paragraphs are usually rendered flush left with a ragged right
margin. The <samp>ALIGN</samp> attribute can be used to explicitly
specify the horizontal alignment:
<dl>
<dt><samp>align=left</samp><dd>The paragraph is rendered flush left.
<dt><samp>align=center</samp><dd>The paragraph is centered.
<dt><samp>align=right</samp><dd>The paragraph is rendered flush right.
</dl>
<p>For example:
<PRE><p align=center>This is a centered paragraph.
<p align=right>and this is a flush right paragraph.</PRE>
<p>The default is left alignment, but this can be overridden by an
enclosing <a href="#div"><samp>DIV</samp></a> or
<a href="#center"><samp>CENTER</samp></a> element.
<h3><a name=lists>Lists</a></h3>
<p>List items can contain block and text level items, including
nested lists, although headings and address elements are excluded.
This limitation is defined via the %flow entity.
<h4><a name=ul>Unordered Lists</a></h4>
<pre>
<!ELEMENT UL - - (LI)+>
<!ENTITY % ULStyle "disc|square|circle">
<!ATTLIST UL -- unordered lists --
type (%ULStyle) #IMPLIED -- bullet style --
compact (compact) #IMPLIED -- reduced interitem spacing --
>
<!ELEMENT LI - O %flow -- list item -->
<!ATTLIST LI
type (%LIStyle) #IMPLIED -- list item style --
>
</pre>
<p>Unordered lists take the form:
<pre> <UL>
<LI> <i>... first list item</i>
<LI> <i>... second list item</i>
...
</UL></pre>
<P>The <samp>UL</samp> element is used for unordered lists. Both start
and end tags are always needed. The <samp>LI</samp> element is used for
individual list items. The end tag for <samp>LI</samp> elements can
always be omitted. Note that <samp>LI</samp> elements can contain nested
lists. The <samp>COMPACT</samp> attribute can be used as a hint to the
user agent to render lists in a more compact style.
<p>The <samp>TYPE</samp> attribute can be used to set the bullet style
on <samp>UL</samp> and <samp>LI</samp> elements. The permitted values
are "disc", "square" or "circle". The default generally depends on the
level of nesting for lists.
<ul>
<li type=disc>with <samp><li type=disc></samp>
<li type=square>with <samp><li type=square></samp>
<li type=circle>with <samp><li type=circle></samp>
</ul>
<p><i>This list was chosen to cater for the original bullet shapes used by
Mosaic in 1993.</i>
<h4><a name=ol>Ordered (i.e. numbered) Lists</a></h4>
<pre>
<!ELEMENT OL - - (LI)+>
<!ATTLIST OL -- ordered lists --
type CDATA #IMPLIED -- numbering style --
start NUMBER #IMPLIED -- starting sequence number --
compact (compact) #IMPLIED -- reduced interitem spacing --
>
<!ELEMENT LI - O %flow -- list item -->
<!ATTLIST LI
type CDATA #IMPLIED -- list item style --
value NUMBER #IMPLIED -- set sequence number --
>
</pre>
<p>Ordered (i.e. numbered) lists take the form:</p>
<pre> <OL>
<LI> <i>... first list item</i>
<LI> <i>... second list item</i>
...
</OL></pre>
<p>The <samp>OL</samp> <samp>START</samp> attribute can be used to
initialize the sequence number (by default it is initialized to 1).
You can set it later on with the <samp>VALUE</samp> attribute on
<samp>LI</samp> elements. Both of these attributes expect integer
values. You can't indicate that numbering should be continued from a
previous list, or to skip missing values without giving an explicit
number.
<p>The <samp>COMPACT</samp> attribute can be used as a hint to the user
agent to render lists in a more compact style. The <samp>OL</samp>
<samp>TYPE</samp> attribute allows you to set the numbering style for
list items:</p>
<table border=1 width="80%" align=center>
<tr><th>Type <th colspan=2>Numbering style<br></tr>
<tr><td align=center>1 <td align=center>Arabic numbers<td align=center>1, 2, 3, ...<br></tr>
<tr><td align=center>a <td align=center>lower alpha<td align=center>a, b, c, ...<br></tr>
<tr><td align=center>A <td align=center>upper alpha<td align=center>A, B, C, ...<br></tr>
<tr><td align=center>i <td align=center>lower roman<td align=center>i, ii, iii, ...<br></tr>
<tr><td align=center>I <td align=center>upper roman<td align=center>I, II, III, ...<br></tr>
</table>
<h4><a name=dl>Definition Lists</a></h4>
<pre>
<!-- definition lists - DT for term, DD for its definition -->
<!ELEMENT DL - - (DT|DD)+>
<!ATTLIST DL
compact (compact) #IMPLIED -- more compact style --
>
<!ELEMENT DT - O (%text)*>
<!ELEMENT DD - O %flow;>
</pre>
<p>Definition lists take the form:
<pre> <DL>
<DT> <i>term name</i>
<DD> <i>term definition</i>
...
</DL></pre>
<p><samp>DT</samp> elements can only act as containers for text level
elements, while <samp>DD</samp> elements can hold block level elements
as well, excluding headings and address elements.
<p>For example:
<PRE><DL>
<DT>Term 1<dd>This is the definition of the first term.
<DT>Term 2<dd>This is the definition of the second term.
</DL></PRE>
<P>which could be rendered as:
<dl>
<dt>Term 1<dd>This is the definition of the first term.
<dt>Term 2<dd>This is the definition of the second term.
</dl>
<p>The <samp>COMPACT</samp> attribute can be used with the
<samp>DL</samp> element as a hint to the user agent to render
lists in a more compact style.
<h4><a name=dir>DIR</a> and <a name=menu>MENU</a></h4>
<pre><!ELEMENT (DIR|MENU) - - (LI)+ -(%block)>
<!ATTLIST (DIR|MENU)
compact (compact) #IMPLIED
></pre>
<p>These elements have been part of HTML from the early days. They are
intended for unordered lists similar to <samp>UL</samp> elements. User
agents are recommended to render <samp>DIR</samp> elements as
multicolumn directory lists, and <samp>MENU</samp> elements as single
column menu lists. In practice, Mosaic and most other user agents
have ignored this advice and instead render <samp>DIR</samp> and
<samp>MENU</samp> in an identical way to <samp>UL</samp> elements.
<h3><a name=pre>Preformatted Text</a></h3>
<pre><!ELEMENT PRE - - (%text)* -(%pre.exclusion)>
<!ATTLIST PRE
width NUMBER #implied
></pre>
<p>The <samp>PRE</samp> element can be used to include preformatted
text. User agents render this in a fixed pitch font, preserving spacing
associated with white space characters such as space and newline
characters. Automatic word-wrap should be disabled within
<samp>PRE</samp> elements.
<p>Note that the SGML standard requires that the parser
remove a newline immediately following the start tag
or immediately preceding the end tag.
<p><samp>PRE</samp> has the same content model as paragraphs,
excluding images and elements that produce changes in font size,
e.g. <samp>IMG</samp>, <samp>BIG</samp>, <samp>SMALL</samp>,
<samp>SUB</samp>, <samp>SUP</samp> and <samp>FONT</samp>.
<p>A few user agents support the <samp>WIDTH</samp> attribute. It
provides a hint to the user agent of the required width in characters.
The user agent can use this to select an appropriate font size or to
indent the content appropriately.
<p>Here is an example of a <samp>PRE</samp> element; a verse from
Shelley (To a Skylark):
<pre><PRE>
Higher still and higher
From the earth thou springest
Like a cloud of fire;
The blue deep thou wingest,
And singing still dost soar, and soaring ever singest.
</PRE></PRE>
which is rendered as:
<pre> Higher still and higher
From the earth thou springest
Like a cloud of fire;
The blue deep thou wingest,
And singing still dost soar, and soaring ever singest.</PRE>
<p>The horizontal tab character (encoded in Unicode, US ASCII and
ISO 8859-1 as decimal 9) should be interpreted as the smallest
non-zero number of spaces which will leave the number of characters
so far on the line as a multiple of 8. Its use is strongly discouraged
since it is common practice when editing to set the tab-spacing to other
values, leading to misaligned documents.
<h4><a name=xmp>XMP</a>, <a name=listing>LISTING</a> and
<a name=plaintext>PLAINTEXT</a></h4>
<pre><![ %HTML.Deprecated [
<!ENTITY % literal "CDATA"
-- historical, non-conforming parsing mode where
the only markup signal is the end tag
in full
-->
<!ELEMENT (XMP|LISTING) - - %literal>
<!ELEMENT PLAINTEXT - O %literal>
]]></pre>
<p>These are obsolete tags for preformatted text that predate the
introduction of <a href="#pre">PRE</a>. User agents may support these
for backwards compatibility. Authors should avoid using them in new
documents!
<h3><a name=div>DIV</a> and <a name=center>CENTER</a></h3>
<pre><!ELEMENT DIV - - %body.content>
<!ATTLIST DIV
align (left|center|right) #IMPLIED -- alignment of following text --
>
<!-- CENTER is a shorthand for DIV with ALIGN=CENTER -->
<!ELEMENT center - - %body.content></pre>
<p><samp>DIV</samp> elements can be used to structure HTML documents as
a hierarchy of divisions. The <samp>ALIGN</samp> attribute can be used
to set the default horizontal alignment for elements within the content
of the <samp>DIV</samp> element. Its value is restricted to
<samp>LEFT</samp>, <samp>CENTER</samp> or <samp>RIGHT</samp>, and is
defined in the same way as for the paragraph element
<samp><P></samp>.
<p>Note that because <samp>DIV</samp> is a block-like element it will
terminate an open <samp>P</samp> element. Other than this, user agents
are <b>not</b> expected to render paragraph breaks before and after
<samp>DIV</samp> elements. <samp>CENTER</samp> is directly equivalent
to <samp>DIV</samp> with <samp>ALIGN=CENTER</samp>. Both
<samp>DIV</samp> and <samp>CENTER</samp> require start and end tags.
<p><i><samp>CENTER</samp> was introduced by Netscape before they added
support for the HTML 3.0 <samp>DIV</samp> element. It is retained in
HTML 3.2 on account of its widespread deployment.</i>
<h3><b><a name=bq>BLOCKQUOTE</a></b></h3>
<pre><!ELEMENT BLOCKQUOTE - - %body.content></pre>
<p>This is used to enclose block quotations from other works.
Both the start and end tags are required. It is often rendered
indented, e.g.
<blockquote>
They went in single file, running like hounds on a strong scent,
and an eager light was in their eyes. Nearly due west the broad
swath of the marching Orcs tramped its ugly slot; the sweet grass
of Rohan had been bruised and blackened as they passed.
</blockquote>
<p align=right><em>from "The Two Towers" by J.R.R. Tolkien.</em>
<h3><b><a name=form>FORM</a></b></h3>
<pre>
<!ENTITY % HTTP-Method "GET | POST"
-- as per HTTP specification
-->
<!ELEMENT FORM - - %body.content -(FORM)>
<!ATTLIST FORM
action %URL #IMPLIED -- server-side form handler --
method (%HTTP-Method) GET -- see HTTP specification --
enctype %Content-Type; "application/x-www-form-urlencoded"
></pre>
<p>This is used to define an HTML form, and you can have more than one form
in the same document. Both the start and end tags are required. For very
simple forms, you can also use the <a href="#isindex"><samp>ISINDEX</samp></a>
element. Forms can contain a wide range of HTML markup including several
kinds of <a href="#fields">form fields</a> such as single and multi-line
text fields, radio button groups, checkboxes, and menus.
<dl>
<dt><b>action</b>
<dd>This specifies a URL which is either used to post forms via email,
e.g. <samp>action="mailto:foo@bar.com"</samp>, or used to invoke a
server-side forms handler via HTTP, e.g.
<samp>action="http://www.acme.com/cgi-bin/register.pl"</samp>
<dt><b>method</b>
<dd>When the action attribute specifies an HTTP server, the method
attribute determines which HTTP method will be used to send the form's
contents to the server. It can be either <samp>GET</samp> or
<samp>POST</samp>, and defaults to <samp>GET</samp>.
<dt><b>enctype</b>
<dd>This determines the mechanism used to encode the form's contents.
It defaults to <em>application/x-www-form-urlencoded</em>.
</dl>
<p>Further details on handling forms are given in RFC 1867.
<h3><b><a name=hr>HR</a></b> <i>- horizontal rules</i></h3>
<p>Horizontal rules may be used to indicate a change in topic.
In a speech based user agent, the rule could be rendered as a pause.
<pre><!ELEMENT HR - O EMPTY>
<!ATTLIST HR
align (left|right|center) #IMPLIED
noshade (noshade) #IMPLIED
size %Pixels #IMPLIED
width %Length #IMPLIED
></pre>
<p><samp>HR</samp> elements are not containers so the end tag is forbidden.
The attributes are: <samp>ALIGN</samp>, <samp>NOSHADE</samp>,
<samp>SIZE</samp> and <samp>WIDTH</samp>.
<dl>
<dt><b>align</b>
<dd>This determines whether the rule is placed at the left, center
or right of the space between the current left and right margins
for <samp>align=left</samp>, <samp>align=center</samp> or
<samp>align=right</samp> respectively. By default, the rule is centered.
<dt><b>noshade</b>
<dd>This attribute requests the user agent to render the rule in a
solid color rather than as the traditional two colour "groove".
<dt><b>size</b>
<dd>This can be used to set the height of the rule in pixels.
<dt><b>width</b>
<dd>This can be used to set the width of the rule in
pixels (e.g. <samp>width=100</samp>) or as the percentage between the
current left and right margins (e.g. <samp>width="50%"</samp>). The
default is 100%. </dl>
<h3><a name=table>Tables</a></h3>
<p>HTML 3.2 includes a widely deployed subset of the specification
given in <a href="#refs">RFC 1942</a> and can be used to
markup tabular material or for layout purposes. Note that the latter
role typically causes problems when rending to speech or to text
only user agents.
<pre>
<!-- horizontal placement of table relative to window -->
<!ENTITY % Where "(left|center|right)">
<!-- horizontal alignment attributes for cell contents -->
<!ENTITY % cell.halign
"align (left|center|right) #IMPLIED"
>
<!-- vertical alignment attributes for cell contents -->
<!ENTITY % cell.valign
"valign (top|middle|bottom) #IMPLIED"
>
<!ELEMENT table - - (caption?, tr+)>
<!ELEMENT tr - O (th|td)*>
<!ELEMENT (th|td) - O %body.content>
<!ATTLIST table -- table element --
align %Where; #IMPLIED -- table position relative to window --
width %Length #IMPLIED -- table width relative to window --
border %Pixels #IMPLIED -- controls frame width around table --
cellspacing %Pixels #IMPLIED -- spacing between cells --
cellpadding %Pixels #IMPLIED -- spacing within cells --
>
<!ELEMENT CAPTION - - (%text;)* -- table or figure caption -->
<!ATTLIST CAPTION
align (top|bottom) #IMPLIED
>
<!ATTLIST tr -- table row --
%cell.halign; -- horizontal alignment in cells --
%cell.valign; -- vertical alignment in cells --
>
<!ATTLIST (th|td) -- header or data cell --
nowrap (nowrap) #IMPLIED -- suppress word wrap --
rowspan NUMBER 1 -- number of rows spanned by cell --
colspan NUMBER 1 -- number of cols spanned by cell --
%cell.halign; -- horizontal alignment in cells --
%cell.valign; -- vertical alignment in cells --
width %Pixels #IMPLIED -- suggested width for cell --
height %Pixels #IMPLIED -- suggested height for cell --
>
</pre>
<p>Tables take the general form:
<pre> <TABLE BORDER=3 CELLSPACING=2 CELLPADDING=2 WIDTH="80%">
<CAPTION><i> ... table caption ...</i> </CAPTION>
<TR><TD> <i>first cell</i> <TD> <i>second cell</i>
<TR> ...
...
</TABLE></pre>
<p>The attributes on <samp>TABLE</samp> are all optional. By default,
the table is rendered without a surrounding border. The table is
generally sized automatically to fit the contents, but you can also set
the table width using the <samp>WIDTH</samp> attribute.
<samp>BORDER</samp>, <samp>CELLSPACING</samp> and
<samp>CELLPADDING</samp> provide further control over the table's
appearence. Captions are rendered at the top or bottom of the table
depending on the <samp>ALIGN</samp> attribute.
<p>Each table row is contained in a <samp>TR</samp> element, although
the end tag can always be omitted. Table cells are defined by
<samp>TD</samp> elements for data and <samp>TH</samp> elements for
headers. Like <samp>TR</samp>, these are containers and can be given
without trailing end tags. <samp>TH</samp> and <samp>TD</samp> support
several attributes: <samp>ALIGN</samp> and <samp>VALIGN</samp> for
aligning cell content, <samp>ROWSPAN</samp> and <samp>COLSPAN</samp> for
cells which span more than one row or column. A cell can contain a wide
variety of other block and text level elements including form fields and
other tables.
<p>The <samp>TABLE</samp> element always requires both start and end tags.
It supports the following attributes:
<dl>
<dt><b>align</b>
<dd>This takes one of the case insensitive values: <samp>LEFT</samp>,
<samp>CENTER</samp> or <samp>RIGHT</samp>. It specifies the horizontal
placement of the table relative to the current left and right margins.
It defaults to left alignment, but this can be overridden by an
enclosing <a href="#div"><samp>DIV</samp></a> or
<a href="#center"><samp>CENTER</samp></a> element.
<dt><b>width</b>
<dd>In the absence of this attribute the table width is automatically
determined from the table contents. You can use the <samp>WIDTH</samp>
attribute to set the table width to a fixed value in pixels (e.g.
<samp>WIDTH=212</samp>) or as a percentage of the space between the
current left and right margins (e.g. <samp>WIDTH="80%"</samp>).
<dt><b>border</b>
<dd>This attribute can be used to specify the width of the outer border
around the table to a given number of pixels (e.g.
<samp>BORDER=4</samp>). The value can be set to zero to suppress the
border altogether. In the absence of this attribute the border should be
suppressed. Note that some browsers also accept <samp><TABLE
BORDER></samp> with the same semantics as <samp>BORDER=1</samp>.
<dt><b>cellspacing</b>
<dd>In traditional desktop publishing software, adjacent table cells
share a common border. This is not the case in HTML. Each cell is given
its own border which is separated from the borders around neighboring
cells. This separation can be set in pixels using the
<samp>CELLSPACING</samp> attribute, (e.g. <samp>CELLSPACING=10</samp>).
The same value also determines the separation between the table border
and the borders of the outermost cells.
<dt><b>cellpadding</b>
<dd>This sets the padding in pixels between the border around each cell
and the cell's contents.
</dl>
<p>The <samp>CAPTION</samp> element has one attribute <samp>ALIGN</samp>
which can be either <samp>ALIGN=TOP</samp> or <samp>ALIGN=BOTTOM</samp>.
This can be used to force the caption to be placed above the top or
below the bottom of the table respectively. Most user agents default to
placing the caption above the table. <samp>CAPTION</samp> always
requires both start and end tags. Captions are limited to plain text and
text-level elements as defined by the %text entity. Block level elements
are not permitted.
<p>The <samp>TR</samp> or table row element requires a start tag, but
the end tag can always be left out. <samp>TR</samp> acts as a container
for table cells. It has two attributes:
<dl>
<dt><b>align</b>
<dd>Sets the default horizontal alignment of cell contents. It takes
one of the case insensitive values: <samp>LEFT</samp>, <samp>CENTER</samp>
or <samp>RIGHT</samp> and plays the same role as the <samp>ALIGN</samp>
attribute on paragraph elements.
<dt><b>valign</b>
<dd>This can be used to set the default vertical alignment of cell
contents within each cell. It takes one of the case insensitive values:
<samp>TOP</samp>, <samp>MIDDLE</samp> or <samp>BOTTOM</samp> to position
the cell contents at the top, middle or bottom of the cell respectively.
</dl>
<p>There are two elements for defining table cells. <samp>TH</samp> is
used for header cells and <samp>TD</samp> for data cells. This
distinction allows user agents to render header and data cells in
different fonts, and enables speech based browsers to do a better job.
The start tags for <samp>TH</samp> and <samp>TD</samp> are always needed
but the end tags can be left out. Table cells can have the following
attributes:
<dl>
<dt><b>nowrap</b>
<dd>The presence of this attribute disables automatic word wrap
within the contents of this cell (e.g. <samp><TD NOWRAP></samp>).
This is equivalent to using the <samp>&nbsp;</samp> entity for
non-breaking spaces within the content of the cell.
<dt><b>rowspan</b>
<dd>This takes a positive integer value specifying the number of
rows spanned by this cell. It defaults to one.
<dt><b>colspan</b>
<dd>This takes a positive integer value specifying the number of
columns spanned by this cell. It defaults to one.
<dt><b>align</b> <dd>Specifies the default horizontal alignment of cell
contents, and overrides the <samp>ALIGN</samp> attribute on the table
row. It takes the same values: <samp>LEFT</samp>, <samp>CENTER</samp>
and <samp>RIGHT</samp>. If you don't specify an <samp>ALIGN</samp>
attribute value on the cell, the default is left alignment for
<samp><td></samp> and center alignment for <samp><th></samp>
although you can override this with an <samp>ALIGN</samp> attribute on
the <samp>TR</samp> element.
<dt><b>valign</b> <dd>Specifies the default vertical alignment of cell
contents, overriding the <samp>VALIGN</samp> attribute on the table row.
It takes the same values: <samp>TOP</samp>, <samp>MIDDLE</samp> and
<samp>BOTTOM</samp>. If you don't specify a VALIGN attribute value on
the cell, the default is middle although you can override this with a
<samp>VALIGN</samp> attribute on the <samp>TR</samp> element.
<dt><b>width</b>
<dd>Specifies the suggested width for a cell content in pixels
excluding the cell padding. This value will normally be
used except when it conflicts with the width requirements
for other cells in the same column.
<dt><b>height</b>
<dd>Specifies the suggested height for a cell content in pixels
excluding the cell padding. This value will normally be
used except when it conflicts with the height requirements
for other cells in the same row.
</dl>
<p>Tables are commonly rendered in bas-relief, raised up with the outer
border as a bevel, and individual cells inset into this raised surface.
Borders around individual cells are only drawn if the cell has explicit
content. White space doesn't count for this purpose with the exception
of &nbsp;.
<p>The algorithms used to automatically size tables should take
into account the minimum and maximum width requirements for each
cell. This is used to determine the minimum and maximum width
requirements for each column and hence for the table itself.
<p>Cells spanning more than one column contribute to the
widths of each of the columns spanned. One approach is to evenly
apportion the cell's minimum and maximum width between these
columns, another is to weight the apportioning according to the
contributions from cells that don't span multiple columns.
<p>For some user agents it may be necessary or desirable to break
text lines within words. In such cases a visual indication that this
has occurred is advised.
<p>The minimum and maximum width of nested tables contribute to the
minimum and maximum width of the cell in which they occur. Once the
width requirements are known for the top level table, the column widths
for that table can be assigned. This allows the widths of nested tables
to be assigned and hence in turn the column widths of such tables.
If practical, all columns should be assigned at least their minimum
widths. It is suggested that any surplus space is then shared out
proportional to the difference between the minimum and maximum width
requirements of each column.
<p>Note that pixel values for width and height refer to screen pixels, and
should be multiplied by an appropriate factor when rendering to very high
resolution devices such as laser printers. For instance if a user agent has
a display with 75 pixels per inch and is rendering to a laser printer with
600 dots per inch, then the pixel values given in HTML attributes should be
multiplied by a factor of 8.
<hr>
<h2><a name=textlevel>Text level elements</a></h2>
<p>These don't cause paragraph breaks. Text level elements
that define character styles can generally be nested. They can
contain other text level elements but not block level elements.
<ul>
<li><a href="#font-style">Font style elements</a>
<li><a href="#phrase">Phrase elements</a>
<li><a href="#fields">Form Fields</a>
<li><a href="#anchor">The A (anchor) element</a>
<li><a href="#img">IMG - inline images</a>
<li><a href="#applet">APPLET <em>(Java Applets)</em></a>
<li><a href="#font">FONT elements</a>
<li><a href="#basefont">BASEFONT elements</a>
<li><a href="#br">BR - line breaks</a>
<li><a href="#map">MAP - client-side image maps</a>
</ul>
<h3><a name=font-style>Font style elements</a></h3>
<p>These all require start and end tags, e.g.
<pre> This has some <B>bold text</B>.</pre>
<p>Text level elements must be properly nested - the following
is in error:
<pre> This has some <B>bold and <I></B>italic text</I>.</pre>
User agents should do their best to respect nested emphasis, e.g.
<pre> This has some <B>bold and <I>italic text</I></B>.</pre>
<p>Where the available fonts are restricted or for speech output, alternative
means should be used for rendering differences in emphasis.
<dl>
<dt><b>TT</b> teletype or monospaced text
<dt><b>I</b> italic text style
<dt><b>B</b> bold text style
<dt><b>U</b> underlined text style
<dt><b>STRIKE</b> strike-through text style
<dt><b>BIG</b> places text in a large font
<dt><b>SMALL</b> places text in a small font
<dt><b>SUB</b> places text in subscript style
<dt><b>SUP</b> places text in superscript style
</dl>
<P><i>Note: future revisions to HTML may be phase out STRIKE
in favor of the more concise "S" tag from HTML 3.0.</i>
<h3><a name=phrase>Phrase Elements</a></h3>
<p>These all require start and end tags, e.g.
<pre> This has some <EM>emphasized text</EM>.</pre>
<dl>
<dt><b>EM</b> basic emphasis typically rendered in an italic font
<dt><b>STRONG</b> strong emphasis typically rendered in a bold font
<dt><b>DFN</b> defining instance of the enclosed term
<dt><b>CODE</b> used for extracts from program code
<dt><b>SAMP</b> used for sample output from programs, and scripts etc.
<dt><b>KBD</b> used for text to be typed by the user
<dt><b>VAR</b> used for variables or arguments to commands
<dt><b>CITE</b> used for citations or references to other sources
</dl>
<h3><a name=fields>Form fields</a></h3>
<p><a href="#input"><samp>INPUT</samp></a>,
<a href="#select"><samp>SELECT</samp></a> and
<a href="#textarea"><samp>TEXTAREA</samp></a> are only allowed within
<samp>FORM</samp> elements. <a href="#input"><samp>INPUT</samp></a> can
be used for a variety of form fields including single line text fields,
password fields, checkboxes, radio buttons, submit and reset buttons,
hidden fields, file upload, and image buttons.
<a href="#select"><samp>SELECT</samp></a> elements are used for single or
multiple choice menus. <a href="#textarea"><samp>TEXTAREA</samp></a>
elements are used to define multi-line text fields. The content of the
element is used to initialize the field.
<h3><a name=input>INPUT <em>text fields, radio buttons, check boxes, ...</em></a></h3>
<p><samp>INPUT</samp> elements are not containers and so the end tag is
forbidden.
<pre><!ENTITY % IAlign "(top|middle|bottom|left|right)">
<!ENTITY % InputType
"(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT
| RESET | FILE | HIDDEN | IMAGE)">
<!ELEMENT INPUT - O EMPTY>
<!ATTLIST INPUT
type %InputType TEXT -- what kind of widget is needed --
name CDATA #IMPLIED -- required for all but submit and reset --
value CDATA #IMPLIED -- required for radio and checkboxes --
checked (checked) #IMPLIED -- for radio buttons and check boxes --
size CDATA #IMPLIED -- specific to each type of field --
maxlength NUMBER #IMPLIED
src %URL #IMPLIED -- for fields with background images --
align %IAlign #IMPLIED -- vertical or horizontal alignment --
></pre>
<dl>
<dt><b>type</b>
<dd>Used to set the type of input field:<p></p>
<dl>
<dt><samp>type=text</samp> <em>(the default)</em>
<dd>A single line text field whose visible size can be set using the <a
href="#isize"><samp>size</samp></a> attribute, e.g. <samp>size=40</samp>
for a 40 character wide field. Users should be able to type more than
this limit though with the text scrolling through the field to keep the
input cursor in view. You can enforce an upper limit on the number of
characters that can be entered with the <a
href="#maxlen"><samp>maxlength</samp></a> attribute. The <a
href="#name"><samp>name</samp></a> attribute is used to name the field,
while the <a href="#value"><samp>value</samp></a> attribute can be used
to initialize the text string shown in the field when the document is
first loaded.
<pre> <input type=text size=40 name=user value="your name"></pre>
<dt><samp>type=password</samp>
<dd>This is like type=text, but echoes characters using a character
like * to hide the text from prying eyes when entering passwords.
You can use <a href="#isize"><samp>size</samp></a> and
<a href="#maxlen"><samp>maxlength</samp></a> attributes to control
the visible and maximum length exactly as per
regular text fields.
<pre> <input type=password size=12 name=pw></pre>
<dt><samp>type=checkbox</samp>
<dd>Used for simple Boolean attributes, or for attributes that can take
multiple values at the same time. The latter is represented by several
checkbox fields with the same <a href="#name"><samp>name</samp></a> and
a different <a href="#value"><samp>value</samp></a> attribute. Each checked
checkbox generates a separate name/value pair in the submitted data, even
if this results in duplicate names. Use the
<a href="#checked"><samp>checked</samp></a> attribute to initialize
the checkbox to its checked state.
<pre> <input type=checkbox checked name=uscitizen value=yes></pre>
<dt><samp>type=radio</samp>
<dd>Used for attributes which can take a single value from a set of
alternatives. Each radio button field in the group should be given the
same <a href="#name"><samp>name</samp></a>. Radio buttons require an explicit
<a href="#value"><samp>value</samp></a> attribute. Only the checked radio
button in the group generates a name/value pair in the submitted data. One
radio button in each group should be initially checked using the
<a href="#checked"><samp>checked</samp></a> attribute.
<pre>
<input type=radio name=age value="0-12">
<input type=radio name=age value="13-17">
<input type=radio name=age value="18-25">
<input type=radio name=age value="26-35" checked>
<input type=radio name=age value="36-">
</pre>
<dt><samp>type=submit</samp>
<dd>This defines a button that users can click to submit the form's
contents to the server. The button's label is set from the
<a href="#value"><samp>value</samp></a> attribute. If the
<a href="#name"><samp>name</samp></a>
attribute is given then the submit button's name/value pair will be
included in the submitted data. You can include several submit buttons
in the form. See <samp>type=image</samp> for graphical submit buttons.
<pre> <input type=submit value="Party on ..."></pre>
<dt><samp>type=image</samp>
<dd>This is used for graphical submit buttons rendered by an image
rather than a text string. The URL for the image is specified with the
<a href="#isrc"><samp>src</samp></a> attribute. The image alignment can
be specified with the <a href="#ialign"><samp>align</samp></a>
attribute. In this respect, graphical submit buttons are treated
identically to <a href="#img"><samp>IMG</samp></a> elements, so you can
set align to left, right, top, middle or bottom. The x and y values of
the location clicked are passed to the server: In the submitted data,
image fields are included as two name/value pairs. The names are derived
by taking the name of the field and appending ".x" for the x value, and
".y" for the y value.
<pre><p>Now choose a point on the map:
<input type=image name=point src="map.gif"></pre>
<p><em><b>Note</b>: image fields typically cause problems for text-only and
speech-based user agents!</em></p>
<dt><samp>type=reset</samp>
<dd>This defines a button that users can click to reset form fields
to their initial state when the document was first loaded. You can
set the label by providing a <a href="#value"><samp>value</samp></a>
attribute. Reset buttons are never sent as part of the form's contents.
<pre> <input type=reset value="Start over ..."></pre>
<dt><samp>type=file</samp>
<dd>This provides a means for users to attach a file to the form's
contents. It is generally rendered by text field and an associated
button which when clicked invokes a file browser to select a file
name. The file name can also be entered directly in the text field.
Just like type=text you can use the <a href="#isize"><samp>size</samp></a>
attribute to set the visible width of this field in average character
widths. You can set an upper limit to the length of file names using the
<a href="#maxlen"><samp>maxlength</samp></a> attribute. Some user agents
support the ability to restrict the kinds of files to those
matching a comma separated list of MIME content types given with
the <samp>ACCEPT</samp> attribute e.g. <samp>accept="image/*"</samp>
restricts files to images. Further information can be found in
<a href="#rfc1867">RFC 1867</a>.
<pre> <input type=file name=photo size=20 accept="image/*"></pre>
<dt><samp>type=hidden</samp>
<dd>These fields should not be rendered and provide a means for servers
to store state information with a form. This will be passed back to the
server when the form is submitted, using the name/value pair defined by
the corresponding attributes. This is a work around for the statelessness
of HTTP. Another approach is to use HTTP "<a href="#refs">Cookies</a>".
<pre> <input type=hidden name=customerid value="c2415-345-8563"></pre>
</dl>
<dt><a name=name><b>name</b></a>
<dd>Used to define the property name that will be used to identify this
field's content when it is submitted to the server.
<dt><a name=value><b>value</b></a>
<dd>Used to initialize the field, or to provide a textual label for
submit and reset buttons.
<dt><a name=checked><b>checked</b></a>
<dd>The presence of this attribute is used to initialize checkboxes and
radio buttons to their checked state.
<dt><a name=isize><b>size</b></a>
<dd>Used to set the visible size of text fields to a given number of
average character widths, e.g. <samp>size=20</samp>
<dt><a name=maxlen><b>maxlength</b></a>
<dd>Sets the maximum number of characters permitted in a text field.
<dt><a name=isrc><b>src</b></a>
<dd>Specifies a URL for the image to use with a graphical submit button.
<dt><a name=ialign><b>align</b></a>
<dd>Used to specify image alignment for graphical submit buttons.
It is defined just like the <a href="#img"><samp>IMG</samp></a> align
attribute and takes one of the values: <samp>top</samp>, <samp>middle</samp>,
<samp>bottom</samp>, <samp>left</samp> or <samp>right</samp>, defaulting
to <samp>bottom</samp>.
</dl>
<h3><a name=select>SELECT <em>menus</em></a></h3>
<pre>
<!ELEMENT SELECT - - (OPTION+)>
<!ATTLIST SELECT
name CDATA #REQUIRED
size NUMBER #IMPLIED
multiple (multiple) #IMPLIED
>
<!ELEMENT OPTION - O (#PCDATA)*>
<!ATTLIST OPTION
selected (selected) #IMPLIED
value CDATA #IMPLIED -- defaults to element content --
>
</pre>
<p><samp>SELECT</samp> is used to define select one from many or many
from many menus. <samp>SELECT</samp> elements require start and end tags
and contain one or more <samp>OPTION</samp> elements that define menu
items. One from many menus are generally rendered as drop-down menus
while many from many menus are generally shown as list boxes.
<p>Example:
<PRE> <SELECT NAME="flavor">
<OPTION VALUE=a>Vanilla
<OPTION VALUE=b>Strawberry
<OPTION VALUE=c>Rum and Raisin
<OPTION VALUE=d>Peach and Orange
</SELECT>
</PRE>
<p><samp>SELECT</samp> attributes:
<dl>
<dt><b>name</b>
<dd>This specifies a property name that is used to identify the menu
choice when the form is submitted to the server. Each selected option
results in a property name/value pair being included as part of the
form's contents.
<dt><b>size</b>
<dd>This sets the number of visible choices for many from many menus.
<dt><b>multiple</b>
<dd>The presence of this attribute signifies that the users can make
multiple selections. By default only one selection is allowed.
</dl>
<p><samp>OPTION</samp> attributes:
<dl>
<dt><b>selected</b>
<dd>When this attribute is present, the option is selected when the
document is initially loaded. It is an error for more than one option
to be so selected for one from many menus.
<dt><b>value</b>
<dd>Specifies the property value to be used when submitting the form's
content. This is combined with the property name as given by the name
attribute of the parent <samp>SELECT</samp> element.
</dl>
<h3><a name=textarea>TEXTAREA <em>multi-line text fields</em></a></h3>
<pre>
<!-- Multi-line text input field. -->
<!ELEMENT TEXTAREA - - (#PCDATA)*>
<!ATTLIST TEXTAREA
name CDATA #REQUIRED
rows NUMBER #REQUIRED
cols NUMBER #REQUIRED
>
</pre>
<p><samp>TEXTAREA</samp> elements require start and end tags. The
content of the element is restricted to text and character entities. It
is used to initialize the text that is shown when the document is first
loaded.
<p>Example:
<pre>
<TEXTAREA NAME=address ROWS=4 COLS=40>
Your address here ...
</TEXTAREA>
</pre>
<P>It is recommended that user agents canonicalize line endings to
CR, LF (ASCII decimal 13, 10) when submitting the field's contents.
The character set for submitted data should be ISO Latin-1, unless
the server has previously indicated that it can support alternative
character sets.
<dl>
<dt><b>name</b>
<dd>This specifies a property name that is used to identify the textarea
field when the form is submitted to the server.
<dt><b>rows</b>
<dd>Specifies the number of visible text lines. Users should be able
to enter more lines that this, so user agents should provide some
means to scroll through the contents of the textarea field when the
contents extend beyond the visible area.
<dt><b>cols</b>
<dd>Specifies the visible width in average character widths. Users should
be able to enter longer lines that this, so user agents should provide
some means to scroll through the contents of the textarea field when the
contents extend beyond the visible area. User agents may wrap visible text
lines to keep long lines visible without the need for scrolling.
</dl>
<h3><a name=specials>Special Text level Elements</a></h3>
<p><a href="#anchor">A</a> (Anchor), <a href="#img">IMG</a>,
<a href="#applet">APPLET</a>, <a href="#font">FONT</a>,
<a href="#basefont">BASEFONT</a>, <a href="#br">BR</a>
and <a href="#map">MAP</a>.
<h4><a name=anchor>The A (anchor) element</a></h4>
<pre>
<!ELEMENT A - - (%text)* -(A)>
<!ATTLIST A
name CDATA #IMPLIED -- named link end --
href %URL #IMPLIED -- URL for linked resource --
rel CDATA #IMPLIED -- forward link types --
rev CDATA #IMPLIED -- reverse link types --
title CDATA #IMPLIED -- advisory title string --
>
</pre>
<p>Anchors can't be nested and always require start and end tags.
They are used to define hypertext links and also to define
named locations for use as targets for hypertext links, e.g.
<pre> The way to <a href="hands-on.html">happiness</a>.</pre>
<p>and also to define named locations for use as targets for hypertext
links, e.g.
<pre> <h2><a name=mit>545 Tech Square - Hacker's Paradise</a></h2></pre>
<dl>
<dt><b>name</b>
<dd>This should be a string defining unique name for the scope of the
current HTML document. <samp>NAME</samp> is used to associate a name
with this part of a document for use with URLs that target a named
section of a document.
<dt><b>href</b>
<dd>Specifies a URL acting as a network address for the linked resource.
This could be another HTML document, a PDF file or an image etc.
<dt><b>rel</b>
<dd>The forward relationship also known as the "link type". It can be
used to determine to how to deal with the linked resource when printing
out a collection of linked resources.
<dt><b>rev</b>
<dd>This defines a reverse relationship. A link from document A to
document B with <samp>REV=relation</samp> expresses the same
relationship as a link from B to A with <samp>REL=relation</samp>.
<samp>REV=made</samp> is sometimes used to identify the document author,
either the author's email address with a mailto URL, or a link to the
author's home page.
<dt><b>title</b>
<dd>An advisory title for the linked resource.
</dl>
<h4><a name=img><B>IMG</B> <i> - inline images</i></a></h4>
<pre><!ENTITY % IAlign "(top|middle|bottom|left|right)">
<!ELEMENT IMG - O EMPTY -- Embedded image -->
<!ATTLIST IMG
src %URL #REQUIRED -- URL of image to embed --
alt CDATA #IMPLIED -- for display in place of image --
align %IAlign #IMPLIED -- vertical or horizontal alignment --
height %Pixels #IMPLIED -- suggested height in pixels --
width %Pixels #IMPLIED -- suggested width in pixels --
border %Pixels #IMPLIED -- suggested link border width --
hspace %Pixels #IMPLIED -- suggested horizontal gutter --
vspace %Pixels #IMPLIED -- suggested vertical gutter --
usemap %URL #IMPLIED -- use client-side image map --
ismap (ismap) #IMPLIED -- use server image map --
></pre>
<p>Used to insert images. <samp>IMG</samp> is an empty element and so
the end tag is forbidden. Images can be positioned vertically relative
to the current textline or floated to the left or right. See
<samp>BR</samp> with the <samp>CLEAR</samp> attribute for control
over textflow.
<pre><i>e.g.</i> <IMG SRC="canyon.gif" ALT="Grand Canyon"></pre>
<p><samp>IMG</samp> elements support the following attributes:
<dl>
<dt><b>src</b>
<dd>This attribute is required for every <samp>IMG</samp> element. It
specifies a URL for the image resource, for instance a GIF, JPEG or PNG
image file.
<dt><b>alt</b>
<dd>This is used to provide a text description of the image and
is vital for interoperability with speech-based and text only
user agents.
<dt><b>align</b>
<dd>This specifies how the image is positioned relative to the current
textline in which it occurs:
<p><!-- fix for Netscape spacing bug with DD --></p>
<dl>
<dt><samp>align=top</samp>
<dd>positions the top of the image
with the top of the current text line. User agents vary in how they
interpret this. Some only take into account what has occurred on the
text line prior to the IMG element and ignore what happens after it.
<dt><samp>align=middle</samp>
<dd>aligns the middle of the image with the baseline for the
current textline.
<dt><samp>align=bottom</samp>
<dd>is the default and aligns the bottom of the image with the baseline.
<dt><samp>align=left</samp>
<dd>floats the image to the current left margin, temporarily changing
this margin, so that subsequent text is flowed along the image's
righthand side. The rendering depends on whether there is any left
aligned text or images that appear earlier than the current image in the
markup. Such text (but not images) generally forces left aligned images
to wrap to a new line, with the subsequent text continuing on the former
line.
<dt><samp>align=right</samp>
<dd>floats the image to the current right margin, temporarily changing
this margin, so that subsequent text is flowed along the image's
lefthand side. The rendering depends on whether there is any right
aligned text or images that appear earlier than the current image in the
markup. Such text (but not images) generally forces right aligned images
to wrap to a new line, with the subsequent text continuing on the former
line.
</dl>
<p>Note that some browsers introduce spurious spacing with multiple left
or right aligned images. As a result authors can't depend on this being
the same for browsers from different vendors. See
<a href="#br"><samp>BR</samp></a> for ways to control text flow.
<dt><b>width</b>
<dd>Specifies the intended width of the image in pixels. When given
together with the height, this allows user agents to reserve screen
space for the image before the image data has arrived over the network.
<dt><b>height</b>
<dd>Specifies the intended height of the image in pixels. When given
together with the width, this allows user agents to reserve screen space
for the image before the image data has arrived over the network.
<dt><b>border</b>
<dd>When the <samp>IMG</samp> element appears as part of a hypertext
link, the user agent will generally indicate this by drawing a colored
border (typically blue) around the image. This attribute can be used to
set the width of this border in pixels. Use <samp>border=0</samp> to
suppress the border altogether. User agents are recommended to provide
additional cues that the image is clickable, e.g. by changing the mouse
pointer.
<dt><b>hspace</b>
<dd>This can be used to provide white space to the immediate left and
right of the image. The <samp>HSPACE</samp> attribute sets the width of
this white space in pixels. By default <samp>HSPACE</samp> is a small
non-zero number.
<dt><b>vspace</b>
<dd>This can be used to provide white space above and below the image
The <samp>VSPACE</samp> attribute sets the height of this white space
in pixels. By default <samp>VSPACE</samp> is a small non-zero number.
<dt><b>usemap</b>
<dd>This can be used to give a URL fragment identifier for a client-side
image map defined with the <a href="#map">MAP</a> element.
<dt><b>ismap</b>
<dd>When the <samp>IMG</samp> element is part of a hypertext link, and
the user clicks on the image, the <samp>ISMAP</samp> attribute causes
the location to be passed to the server. This mechanism causes problems
for text-only and speech-based user agents. Whenever its possible to
do so use the <samp>MAP</samp> element instead.
</dl>
<p>Here is an example of how you use <samp>ISMAP</samp>:
<pre><a href="/cgibin/navbar.map"><img src=navbar.gif ismap border=0></a></pre>
<p>The location clicked is passed to the server as follows. The user
agent derives a new URL from the URL specified by the <samp>HREF</samp>
attribute by appending `?' the x coordinate `,' and the y coordinate of
the location in pixels. The link is then followed using the new URL. For
instance, if the user clicked at at the location x=10, y=27 then the
derived URL will be: <i>"<samp>/cgibin/navbar.map?10,27</samp>"</i>. It
is generally a good idea to suppress the border and use graphical idioms
to indicate that the image is clickable.
<p>Note that pixel values refer to screen pixels, and should be
multiplied by an appropriate factor when rendering to very high
resolution devices such as laser printers. For instance if a
user agent has a display with 75 pixels per inch and is rendering
to a laser printer with 600 dots per inch, then the pixel values
given in HTML attributes should be multiplied by a factor of 8.
<h4><a name=applet>APPLET <em>(Java Applets)</em></a></h4>
<pre>
<!ELEMENT APPLET - - (PARAM | %text)*>
<!ATTLIST APPLET
codebase %URL #IMPLIED -- code base --
code CDATA #REQUIRED -- class file --
alt CDATA #IMPLIED -- for display in place of applet --
name CDATA #IMPLIED -- applet name --
width %Pixels #REQUIRED -- suggested width in pixels --
height %Pixels #REQUIRED -- suggested height in pixels --
align %IAlign #IMPLIED -- vertical or horizontal alignment --
hspace %Pixels #IMPLIED -- suggested horizontal gutter --
vspace %Pixels #IMPLIED -- suggested vertical gutter --
>
<!ELEMENT PARAM - O EMPTY>
<!ATTLIST PARAM
name NMTOKEN #REQUIRED -- The name of the parameter --
value CDATA #IMPLIED -- The value of the parameter --
>
</pre>
<p>Requires start and end tags. This element is supported by all Java
enabled browsers. It allows you to embed a Java applet into HTML
documents. <samp>APPLET</samp> uses associated <a
href="#param"><samp>PARAM</samp></a> elements to pass parameters to the
applet. Following the <samp>PARAM</samp> elements, the content of
<samp>APPLET</samp> elements should be used to provide an alternative to
the applet for user agents that don't support Java. It is restricted to
text-level markup as defined by the <i><samp>%text</samp></i> entity in
the DTD. Java-compatible browsers ignore this extra HTML code. You can
use it to show a snapshot of the applet running, with text explaining
what the applet does. Other possibilities for this area are a link to a
page that is more useful for the Java-ignorant browser, or text that
taunts the user for not having a Java-compatible browser.
<p>Here is a simple example of a Java applet:
<pre>
<applet code="Bubbles.class" width=500 height=500>
Java applet that draws animated bubbles.
</applet>
</pre>
<p>Here is another one using a <samp>PARAM</samp> element:
<pre>
<applet code="AudioItem" width=15 height=15>
<param name=snd value="Hello.au|Welcome.au">
Java applet that plays a welcoming sound.
</applet>
</pre>
<dl>
<dt><b>codebase =</b> <em>codebaseURL</em>
<dd>This optional attribute specifies the base URL of the applet --
the directory or folder that contains the applet's code.
If this attribute is not specified,
then the document's URL is used.
<p>
<dt><b>code =</b> <em>appletFile</em>
<dd>This required attribute gives the name of the file
that contains the applet's compiled Applet subclass.
This file is relative to the base URL of the applet.
It cannot be absolute.
<p>
<dt><b>alt =</b> <em>alternateText</em>
<dd>This optional attribute specifies any text
that should be displayed
if the browser understands the APPLET tag
but can't run Java applets.
<p>
<dt><b>name =</b> <em>appletInstanceName</em>
<dd>This optional attribute specifies a name for the applet instance,
which makes it possible for applets on the same page
to find (and communicate with) each other.
<p>
<dt><b>width =</b> <em>pixels</em>
<br>
<b>height =</b> <em>pixels</em>
<dd>These required attributes give the initial width and height
(in pixels) of the applet display area,
not counting any windows or dialogs that the applet brings up.
<p>
<dt><b>align =</b> <em>alignment</em>
<dd>This attribute specifies the alignment of the applet.
This attribute is defined in exactly the same way
as the <a href="#img"><samp>IMG</samp></a> element.
The permitted values are: <samp>top</samp>, <samp>middle</samp>,
<samp>bottom</samp>, <samp>left</samp> and <samp>right</samp>.
The default is <samp>bottom</samp>.
<p>
<dt><b>vspace =</b> <em>pixels</em>
<br>
<b>hspace =</b> <em>pixels</em>
<dd>These optional attributes specify the number of pixels above and
below the applet (<samp>VSPACE</samp>) and on each side of the
applet (<samp>HSPACE</samp>). They're treated the same way as the
<samp>IMG</samp> element's <samp>VSPACE</samp> and <samp>HSPACE</samp>
attributes.
</dl>
<p><a name=param>The <samp>PARAM</samp> element is used to pass named
parameters to applet:</a>
<pre> <b><PARAM NAME =</b> <em>appletParameter</em> <b>VALUE =</b> <em>value</em><b>></b></pre>
<P><samp>PARAM</samp> elements are the only way to specify applet-specific
parameters. Applets read user-specified values for parameters with the
<code>getParameter()</code> method.
<dl>
<dt><b>name =</b> <em>applet parameter name</em>
<dt><b>value =</b> <em>parameter value</em>
</dl>
<p>SGML character entities such as <em><samp>&eacute;</samp></em>
and <em><samp>&#185;</samp></em>
are expanded before the parameter value is passed to the applet.
To include an & character use <samp>&amp;</samp>.
<p><em>Note: PARAM elements should be placed at the start of the
content for the APPLET element. This is not specified as part of the
DTD due to technicalities with SGML mixed content models.</em>
<h4><a name=font>FONT</a></h4>
<pre>
<!ELEMENT FONT - - (%text)* -- local change to font -->
<!ATTLIST FONT
size CDATA #IMPLIED -- [+]nn e.g. size="+1", size=4 --
color CDATA #IMPLIED -- #RRGGBB in hex, e.g. red: color="#FF0000" --
></pre>
<p>Requires start and end tags. This allows you to change the font size
and/or color for the enclosed text. The attributes are: <samp>SIZE</samp>
and <samp>COLOR</samp>. Font sizes are given in terms of a scalar range
defined by the user agent with no direct mapping to point sizes etc.
The <samp>FONT</samp> element may be phased out in future revisions
to HTML.
<dl>
<dt><b>size</b>
<dd>This sets the font size for the contents of the font element. You
can set size to an integer ranging from 1 to 7 for an absolute font
size, or specify a relative font size with a signed integer value, e.g.
<samp>size="+1"</samp> or <samp>size="-2"</samp>. This is mapped to an
absolute font size by adding the current base font size as set by the
<samp>BASEFONT</samp> element (see below).
<dt><b>color</b>
<dd>Used to set the color to stroke the text. Colors are given as RGB
in hexadecimal notation or as one of 16 widely understood
<a href="#colors">color names</a> defined as per the BGCOLOR attribute
on the <a href="#body"><samp>BODY</samp></a> element.
</dl>
<p><em>Some user agents also support a <samp>FACE</samp> attribute which
accepts a comma separated list of font names in order of preference.
This is used to search for an installed font with the corresponding
name. <samp>FACE</samp> is not part of HTML 3.2.</em>
<p>The following shows the effects of setting font to absolute sizes:
<p><font size=1>size=1</font>
<font size=2>size=2</font>
<font size=3>size=3</font>
<font size=4>size=4</font>
<font size=5>size=5</font>
<font size=6>size=6</font>
<font size=7>size=7</font>
<p>The following shows the effect of relative font sizes using
a base font size of 3:
<p><basefont size=3>
<font size="-4">size=-4</font>
<font size="-3">size=-3</font>
<font size="-2">size=-2</font>
<font size="-1">size=-1</font>
<font size="+1">size=+1</font>
<font size="+2">size=+2</font>
<font size="+3">size=+3</font>
<font size="+4">size=+4</font>
<p>The same thing with a base font size of 6:
<p><basefont size=6>
<font size="-4">size=-4</font>
<font size="-3">size=-3</font>
<font size="-2">size=-2</font>
<font size="-1">size=-1</font>
<font size="+1">size=+1</font>
<font size="+2">size=+2</font>
<font size="+3">size=+3</font>
<font size="+4">size=+4</font>
<basefont size=3>
<h4><a name=basefont>BASEFONT</a></h4>
<pre>
<!ELEMENT BASEFONT - O EMPTY -- base font size (1 to 7) -->
<!ATTLIST BASEFONT
size CDATA #IMPLIED -- e.g. size=4, defaults to 3 --
></pre>
<p>Used to set the base font size. <samp>BASEFONT</samp> is an empty
element so the end tag is forbidden. The <samp>SIZE</samp> attribute is
an integer value ranging from 1 to 7. The base font size applies to the
normal and preformatted text but not to headings, except where these are
modified using the <samp>FONT</samp> element with a relative font size.
<h4><a name=br>BR</a></h4>
<p>Used to force a line break. This is an empty element so the end tag
is forbidden. The <samp>CLEAR</samp> attribute can be used to move down
past floating images on either margin. <samp><BR
CLEAR=LEFT></samp> moves down past floating images on the left
margin, <samp><BR CLEAR=RIGHT></samp> does the same for floating
images on the right margin, while <samp><BR CLEAR=ALL></samp> does
the same for such images on both left and right margins.
<h4><a name=map>MAP</a></h4>
<p>The <samp>MAP</samp> element provides a mechanism for client-side
image maps. These can be placed in the same document or grouped in a
separate document although this isn't yet widely supported. The
<samp>MAP</samp> element requires start and end tags. It contains one or
more <samp>AREA</samp> elements that specify hotzones on the associated
image and bind these hotzones to URLs.
<pre><!ENTITY % SHAPE "(rect|circle|poly)">
<!ENTITY % COORDS "CDATA" -- comma separated list of numbers -->
<!ELEMENT MAP - - (AREA)+>
<!ATTLIST MAP
name CDATA #REQUIRED
>
<!ELEMENT AREA - O EMPTY>
<!ATTLIST AREA
shape %SHAPE rect
coords %COORDS #IMPLIED -- defines coordinates for shape --
href %URL #IMPLIED -- this region acts as hypertext link --
nohref (nohref) #IMPLIED -- this region has no action --
alt CDATA #REQUIRED -- needed for non-graphical user agents --
></pre>
<p>Here is a simple example for a graphical navigational toolbar:
<pre><img src="navbar.gif" border=0 usemap="#map1">
<map name="map1">
<area href=guide.html alt="Access Guide" shape=rect coords="0,0,118,28">
<area href=search.html alt="Search" shape=rect coords="184,0,276,28">
<area href=shortcut.html alt="Go" shape=rect coords="118,0,184,28">
<area href=top10.html alt="Top Ten" shape=rect coords="276,0,373,28">
</map></pre>
<P>The <samp>MAP</samp> element has one attribute <samp>NAME</samp>
which is used to associate a name with a map. This is then used by the
<samp>USEMAP</samp> attribute on the <samp>IMG</samp> element to
reference the map via a URL fragment identifier. Note that the value of
the <samp>NAME</samp> attribute is case sensitive.
<p>The <samp>AREA</samp> element is an empty element and so the end tag
is forbidden. It takes the following attributes: <samp>SHAPE</samp>,
<samp>COORDS</samp>, <samp>HREF</samp>, <samp>NOHREF</samp> and
<samp>ALT</samp>. The <samp>SHAPE</samp> and <samp>COORDS</samp>
attributes define a region on the image. If the <samp>SHAPE</samp>
attribute is omitted, <samp>SHAPE="RECT"</samp> is assumed.
<dl>
<dd><b>shape=rect coords="</b><i>left-x<b>,</b> top-y<b>,</b>
right-x<b>,</b> bottom-y</i><b>"</b><p>
<dd><b>shape=circle coords="</b><i>center-x<b>,</b>
center-y<b>,</b> radius</i><b>"</b> <p>
<dd><b>shape=poly
coords="</b><i>x<sub>1</sub><b>,</b>y<sub>1</sub><b>,</b>
x<sub>2</sub><b>,</b>y<sub>2</sub><b>,</b>
x<sub>3</sub><b>,</b>y<sub>3</sub><b>,</b> ...</i><b>"</b>
</dl>
<p>Where <b>x</b> and <b>y</b> are measured in pixels from the left/top
of the associated image. If <b>x</b> and <b>y</b> values are given with a
percent sign as a suffix, the values should be interpreted as percentages
of the image's width and height, respectively. For example:
<pre> SHAPE=RECT COORDS="0, 0, 50%, 100%"</pre>
<p>The <samp>HREF</samp> attribute gives a URL for the target of the
hypertext link. The <samp>NOHREF</samp> attribute is used when you want
to define a region that doesn't act as a hotzone. This is useful when
you want to cut a hole in an underlying region acting as a hotzone.
<p>If two or more regions overlap, the region defined first in the map
definition takes precedence over subsequent regions. This means that
<samp>AREA</samp> elements with <samp>NOHREF</samp> should generally be
placed before ones with the <samp>HREF</samp> attribute.
<p>The <samp>ALT</samp> attribute is used to provide text labels which
can be displayed in the status line as the mouse or other pointing
device is moved over hotzones, or for constructing a textual menu for
non-graphical user agents. Authors are <b>strongly recommended</b> to
provide meaningful <samp>ALT</samp> attributes to support
interoperability with speech-based or text-only user agents.
<hr>
<h2><a name=catalog>Sample SGML Open Catalog for HTML 3.2</a></h2>
<p>This can be used with an SGML parser like nsgmls to verify that
files conform to the HTML 3.2 DTD. It assumes that the DTD has been
saved as the file "HTML32.dtd" and that the Latin-1 entities are
in the file "ISOlat1.ent".
<pre>
-- html32.soc: catalog for parsing HTML 3.2 documents --
SGMLDECL "HTML32.dcl"
PUBLIC "-//W3C//DTD HTML 3.2 Final//EN" HTML32.dtd
PUBLIC "-//W3C//DTD HTML 3.2 Draft//EN" HTML32.dtd
PUBLIC "-//W3C//DTD HTML 3.2//EN" HTML32.dtd
PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML" ISOlat1.ent
</pre>
<hr>
<h2><a name=sgmldecl>SGML Declaration for HTML 3.2</a></h2>
<p>This uses the 8 bit ISO Latin-1 character set. The size limits on
properties like literals and tag names have been considerably increased
from their HTML 2.0 values, but it is recommended that user agents avoid
imposing arbitrary length limits.
<pre>
<!SGML "ISO 8879:1986"
--
SGML Declaration for HyperText Markup Language version 3.2
With support for ISO Latin-1 and increased limits
for tag and literal lengths etc.
--
CHARSET
BASESET "ISO 646:1983//CHARSET
International Reference Version
(IRV)//ESC 2/5 4/0"
DESCSET 0 9 UNUSED
9 2 9
11 2 UNUSED
13 1 13
14 18 UNUSED
32 95 32
127 1 UNUSED
BASESET "ISO Registration Number 100//CHARSET
ECMA-94 Right Part of
Latin Alphabet Nr. 1//ESC 2/13 4/1"
DESCSET 128 32 UNUSED
160 96 32
CAPACITY SGMLREF
TOTALCAP 200000
GRPCAP 150000
ENTCAP 150000
SCOPE DOCUMENT
SYNTAX
SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 127
BASESET "ISO 646:1983//CHARSET
International Reference Version
(IRV)//ESC 2/5 4/0"
DESCSET 0 128 0
FUNCTION
RE 13
RS 10
SPACE 32
TAB SEPCHAR 9
NAMING LCNMSTRT ""
UCNMSTRT ""
LCNMCHAR ".-"
UCNMCHAR ".-"
NAMECASE GENERAL YES
ENTITY NO
DELIM GENERAL SGMLREF
SHORTREF SGMLREF
NAMES SGMLREF
QUANTITY SGMLREF
ATTSPLEN 65536
LITLEN 65536
NAMELEN 65536
PILEN 65536
TAGLVL 100
TAGLEN 65536
GRPGTCNT 150
GRPCNT 64
FEATURES
MINIMIZE
DATATAG NO
OMITTAG YES
RANK NO
SHORTTAG YES
LINK
SIMPLE NO
IMPLICIT NO
EXPLICIT NO
OTHER
CONCUR NO
SUBDOC NO
FORMAL YES
APPINFO NONE
>
</pre>
<hr>
<h2><a name=dtd>HTML 3.2 Document Type Definition</a></h2>
<pre>
<!--
W3C Document Type Definition for the HyperText Markup Language
version 3.2 as ratified by a vote of W3C member companies.
For more information on W3C look at URL http://www.w3.org/
Date: Tuesday January 14th 1997
Author: Dave Raggett <dsr@w3.org>
HTML 3.2 aims to capture recommended practice as of early '96
and as such to be used as a replacement for HTML 2.0 (RFC 1866).
Widely deployed rendering attributes are included where they
have been shown to be interoperable. SCRIPT and STYLE are
included to smooth the introduction of client-side scripts
and style sheets. Browsers must avoid showing the contents
of these element Otherwise support for them is not required.
ID, CLASS and STYLE attributes are not included in this version
of HTML.
-->
<!ENTITY % HTML.Version
"-//W3C//DTD HTML 3.2 Final//EN"
-- Typical usage:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
...
</html>
--
>
<!--================== Deprecated Features Switch =========================-->
<!ENTITY % HTML.Deprecated "INCLUDE">
<!--================== Imported Names =====================================-->
<!ENTITY % Content-Type "CDATA"
-- meaning a MIME content type, as per RFC1521
-->
<!ENTITY % HTTP-Method "GET | POST"
-- as per HTTP specification
-->
<!ENTITY % URL "CDATA"
-- The term URL means a CDATA attribute
whose value is a Uniform Resource Locator,
See RFC1808 (June 95) and RFC1738 (Dec 94).
-->
<!-- Parameter Entities -->
<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK" -- repeatable head elements -->
<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
<!ENTITY % list "UL | OL | DIR | MENU">
<![ %HTML.Deprecated [
<!ENTITY % preformatted "PRE | XMP | LISTING">
]]>
<!ENTITY % preformatted "PRE">
<!--================ Character mnemonic entities ==========================-->
<!ENTITY % ISOlat1 PUBLIC
"ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML">
%ISOlat1;
<!--================ Entities for special symbols =========================-->
<!-- &trade and &cbsp are not widely deployed and so not included here -->
<!ENTITY amp CDATA "&#38;" -- ampersand -->
<!ENTITY gt CDATA "&#62;" -- greater than -->
<!ENTITY lt CDATA "&#60;" -- less than -->
<!--=================== Text Markup =======================================-->
<!ENTITY % font "TT | I | B | U | STRIKE | BIG | SMALL | SUB | SUP">
<!ENTITY % phrase "EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE">
<!ENTITY % special "A | IMG | APPLET | FONT | BASEFONT | BR | SCRIPT | MAP">
<!ENTITY % form "INPUT | SELECT | TEXTAREA">
<!ENTITY % text "#PCDATA | %font | %phrase | %special | %form">
<!ELEMENT (%font|%phrase) - - (%text)*>
<!-- there are also 16 widely known color names although
the resulting colors are implementation dependent:
aqua, black, blue, fuchsia, gray, green, lime, maroon,
navy, olive, purple, red, silver, teal, white, and yellow
These colors were originally picked as being the standard
16 colors supported with the Windows VGA palette.
-->
<!ELEMENT FONT - - (%text)* -- local change to font -->
<!ATTLIST FONT
size CDATA #IMPLIED -- [+]nn e.g. size="+1", size=4 --
color CDATA #IMPLIED -- #RRGGBB in hex, e.g. red: color="#FF0000" --
>
<!ELEMENT BASEFONT - O EMPTY -- base font size (1 to 7)-->
<!ATTLIST BASEFONT
size CDATA #IMPLIED -- e.g. size=3 --
>
<!ELEMENT BR - O EMPTY -- forced line break -->
<!ATTLIST BR
clear (left|all|right|none) none -- control of text flow --
>
<!--================== HTML content models ================================-->
<!--
HTML has three basic content models:
%text character level elements and text strings
%flow block-like elements e.g. paragraphs and lists
%bodytext as %flow plus headers H1-H6 and ADDRESS
-->
<!ENTITY % block
"P | %list | %preformatted | DL | DIV | CENTER |
BLOCKQUOTE | FORM | ISINDEX | HR | TABLE">
<!-- %flow is used for DD and LI -->
<!ENTITY % flow "(%text | %block)*">
<!--=================== Document Body =====================================-->
<!ENTITY % body.content "(%heading | %text | %block | ADDRESS)*">
<!ENTITY % color "CDATA" -- a color specification: #HHHHHH @@ details? -->
<!ENTITY % body-color-attrs "
bgcolor %color #IMPLIED
text %color #IMPLIED
link %color #IMPLIED
vlink %color #IMPLIED
alink %color #IMPLIED
">
<!ELEMENT BODY O O %body.content>
<!ATTLIST BODY
background %URL #IMPLIED -- texture tile for document background --
%body-color-attrs; -- bgcolor, text, link, vlink, alink --
>
<!ENTITY % address.content "((%text;) | P)*">
<!ELEMENT ADDRESS - - %address.content>
<!ELEMENT DIV - - %body.content>
<!ATTLIST DIV
align (left|center|right) #IMPLIED -- alignment of following text --
>
<!-- CENTER is a shorthand for DIV with ALIGN=CENTER -->
<!ELEMENT center - - %body.content>
<!--================== The Anchor Element =================================-->
<!ELEMENT A - - (%text)* -(A)>
<!ATTLIST A
name CDATA #IMPLIED -- named link end --
href %URL #IMPLIED -- URL for linked resource --
rel CDATA #IMPLIED -- forward link types --
rev CDATA #IMPLIED -- reverse link types --
title CDATA #IMPLIED -- advisory title string --
>
<!--================== Client-side image maps ============================-->
<!-- These can be placed in the same document or grouped in a
separate document although this isn't yet widely supported -->
<!ENTITY % SHAPE "(rect|circle|poly)">
<!ENTITY % COORDS "CDATA" -- comma separated list of numbers -->
<!ELEMENT MAP - - (AREA)*>
<!ATTLIST MAP
name CDATA #IMPLIED
>
<!ELEMENT AREA - O EMPTY>
<!ATTLIST AREA
shape %SHAPE rect
coords %COORDS #IMPLIED -- defines coordinates for shape --
href %URL #IMPLIED -- this region acts as hypertext link --
nohref (nohref) #IMPLIED -- this region has no action --
alt CDATA #REQUIRED -- needed for non-graphical user agents --
>
<!--================== The LINK Element ==================================-->
<!ENTITY % Types "CDATA"
-- See Internet Draft: draft-ietf-html-relrev-00.txt
LINK has been part of HTML since the early days
although few browsers as yet take advantage of it.
Relationship values can be used in principle:
a) for document specific toolbars/menus when used
with the LINK element in the document head:
b) to link to a separate style sheet
c) to make a link to a script
d) by stylesheets to control how collections of
html nodes are rendered into printed documents
e) to make a link to a printable version of this document
e.g. a postscript or pdf version
-->
<!ELEMENT LINK - O EMPTY>
<!ATTLIST LINK
href %URL #IMPLIED -- URL for linked resource --
rel %Types #IMPLIED -- forward link types --
rev %Types #IMPLIED -- reverse link types --
title CDATA #IMPLIED -- advisory title string --
>
<!--=================== Images ============================================-->
<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
<!ENTITY % Pixels "NUMBER" -- integer representing length in pixels -->
<!-- Suggested widths are used for negotiating image size
with the module responsible for painting the image.
align=left or right cause image to float to margin
and for subsequent text to wrap around image -->
<!ENTITY % IAlign "(top|middle|bottom|left|right)">
<!ELEMENT IMG - O EMPTY -- Embedded image -->
<!ATTLIST IMG
src %URL #REQUIRED -- URL of image to embed --
alt CDATA #IMPLIED -- for display in place of image --
align %IAlign #IMPLIED -- vertical or horizontal alignment --
height %Pixels #IMPLIED -- suggested height in pixels --
width %Pixels #IMPLIED -- suggested width in pixels --
border %Pixels #IMPLIED -- suggested link border width --
hspace %Pixels #IMPLIED -- suggested horizontal gutter --
vspace %Pixels #IMPLIED -- suggested vertical gutter --
usemap %URL #IMPLIED -- use client-side image map --
ismap (ismap) #IMPLIED -- use server image map --
>
<!-- USEMAP points to a MAP element which may be in this document
or an external document, although the latter is not widely supported -->
<!--=================== Java APPLET tag ===================================-->
<!--
This tag is supported by all Java enabled browsers. Applet resources
(including their classes) are normally loaded relative to the document
URL (or <BASE> element if it is defined). The CODEBASE attribute is used
to change this default behavior. If the CODEBASE attribute is defined then
it specifies a different location to find applet resources. The value
can be an absolute URL or a relative URL. The absolute URL is used as is
without modification and is not effected by the documents <BASE> element.
When the codebase attribute is relative, then it is relative to the
document URL (or <BASE> tag if defined).
-->
<!ELEMENT APPLET - - (PARAM | %text)*>
<!ATTLIST APPLET
codebase %URL #IMPLIED -- code base --
code CDATA #REQUIRED -- class file --
alt CDATA #IMPLIED -- for display in place of applet --
name CDATA #IMPLIED -- applet name --
width %Pixels #REQUIRED -- suggested width in pixels --
height %Pixels #REQUIRED -- suggested height in pixels --
align %IAlign #IMPLIED -- vertical or horizontal alignment --
hspace %Pixels #IMPLIED -- suggested horizontal gutter --
vspace %Pixels #IMPLIED -- suggested vertical gutter --
>
<!ELEMENT PARAM - O EMPTY>
<!ATTLIST PARAM
name NMTOKEN #REQUIRED -- The name of the parameter --
value CDATA #IMPLIED -- The value of the parameter --
>
<!--
Here is an example:
<applet codebase="applets/NervousText"
code=NervousText.class
width=300
height=50>
<param name=text value="Java is Cool!">
<img src=sorry.gif alt="This looks better with Java support">
</applet>
-->
<!--=================== Horizontal Rule ===================================-->
<!ELEMENT HR - O EMPTY>
<!ATTLIST HR
align (left|right|center) #IMPLIED
noshade (noshade) #IMPLIED
size %Pixels #IMPLIED
width %Length #IMPLIED
>
<!--=================== Paragraphs=========================================-->
<!ELEMENT P - O (%text)*>
<!ATTLIST P
align (left|center|right) #IMPLIED
>
<!--=================== Headings ==========================================-->
<!--
There are six levels of headers from H1 (the most important)
to H6 (the least important).
-->
<!ELEMENT ( %heading ) - - (%text;)*>
<!ATTLIST ( %heading )
align (left|center|right) #IMPLIED
>
<!--=================== Preformatted Text =================================-->
<!-- excludes images and changes in font size -->
<!ENTITY % pre.exclusion "IMG|BIG|SMALL|SUB|SUP|FONT">
<!ELEMENT PRE - - (%text)* -(%pre.exclusion)>
<!ATTLIST PRE
width NUMBER #implied -- is this widely supported? --
>
<![ %HTML.Deprecated [
<!ENTITY % literal "CDATA"
-- historical, non-conforming parsing mode where
the only markup signal is the end tag
in full
-->
<!ELEMENT (XMP|LISTING) - - %literal>
<!ELEMENT PLAINTEXT - O %literal>
]]>
<!--=================== Block-like Quotes =================================-->
<!ELEMENT BLOCKQUOTE - - %body.content>
<!--=================== Lists =============================================-->
<!--
HTML 3.2 allows you to control the sequence number for ordered lists.
You can set the sequence number with the START and VALUE attributes.
The TYPE attribute may be used to specify the rendering of ordered
and unordered lists.
-->
<!-- definition lists - DT for term, DD for its definition -->
<!ELEMENT DL - - (DT|DD)+>
<!ATTLIST DL
compact (compact) #IMPLIED -- more compact style --
>
<!ELEMENT DT - O (%text)*>
<!ELEMENT DD - O %flow;>
<!-- Ordered lists OL, and unordered lists UL -->
<!ELEMENT (OL|UL) - - (LI)+>
<!--
Numbering style
1 Arabic numbers 1, 2, 3, ...
a lower alpha a, b, c, ...
A upper alpha A, B, C, ...
i lower Roman i, ii, iii, ...
I upper Roman I, II, III, ...
The style is applied to the sequence number which by default
is reset to 1 for the first list item in an ordered list.
This can't be expressed directly in SGML due to case folding.
-->
<!ENTITY % OLStyle "CDATA" -- constrained to: [1|a|A|i|I] -->
<!ATTLIST OL -- ordered lists --
type %OLStyle #IMPLIED -- numbering style --
start NUMBER #IMPLIED -- starting sequence number --
compact (compact) #IMPLIED -- reduced interitem spacing --
>
<!-- bullet styles -->
<!ENTITY % ULStyle "disc|square|circle">
<!ATTLIST UL -- unordered lists --
type (%ULStyle) #IMPLIED -- bullet style --
compact (compact) #IMPLIED -- reduced interitem spacing --
>
<!ELEMENT (DIR|MENU) - - (LI)+ -(%block)>
<!ATTLIST DIR
compact (compact) #IMPLIED
>
<!ATTLIST MENU
compact (compact) #IMPLIED
>
<!-- <DIR> Directory list -->
<!-- <DIR COMPACT> Compact list style -->
<!-- <MENU> Menu list -->
<!-- <MENU COMPACT> Compact list style -->
<!-- The type attribute can be used to change the bullet style
in unordered lists and the numbering style in ordered lists -->
<!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle|%OLStyle)" -->
<!ELEMENT LI - O %flow -- list item -->
<!ATTLIST LI
type %LIStyle #IMPLIED -- list item style --
value NUMBER #IMPLIED -- reset sequence number --
>
<!--================ Forms ===============================================-->
<!ELEMENT FORM - - %body.content -(FORM)>
<!ATTLIST FORM
action %URL #IMPLIED -- server-side form handler --
method (%HTTP-Method) GET -- see HTTP specification --
enctype %Content-Type; "application/x-www-form-urlencoded"
>
<!ENTITY % InputType
"(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT
| RESET | FILE | HIDDEN | IMAGE)">
<!ELEMENT INPUT - O EMPTY>
<!ATTLIST INPUT
type %InputType TEXT -- what kind of widget is needed --
name CDATA #IMPLIED -- required for all but submit and reset --
value CDATA #IMPLIED -- required for radio and checkboxes --
checked (checked) #IMPLIED -- for radio buttons and check boxes --
size CDATA #IMPLIED -- specific to each type of field --
maxlength NUMBER #IMPLIED -- max chars allowed in text fields --
src %URL #IMPLIED -- for fields with background images --
align %IAlign #IMPLIED -- vertical or horizontal alignment --
>
<!ELEMENT SELECT - - (OPTION+)>
<!ATTLIST SELECT
name CDATA #REQUIRED
size NUMBER #IMPLIED
multiple (multiple) #IMPLIED
>
<!ELEMENT OPTION - O (#PCDATA)*>
<!ATTLIST OPTION
selected (selected) #IMPLIED
value CDATA #IMPLIED -- defaults to element content --
>
<!-- Multi-line text input field. -->
<!ELEMENT TEXTAREA - - (#PCDATA)*>
<!ATTLIST TEXTAREA
name CDATA #REQUIRED
rows NUMBER #REQUIRED
cols NUMBER #REQUIRED
>
<!--======================= Tables ========================================-->
<!-- Widely deployed subset of the full table standard, see RFC 1942
e.g. at http://www.ics.uci.edu/pub/ietf/html/rfc1942.txt -->
<!-- horizontal placement of table relative to window -->
<!ENTITY % Where "(left|center|right)">
<!-- horizontal alignment attributes for cell contents -->
<!ENTITY % cell.halign
"align (left|center|right) #IMPLIED"
>
<!-- vertical alignment attributes for cell contents -->
<!ENTITY % cell.valign
"valign (top|middle|bottom) #IMPLIED"
>
<!ELEMENT table - - (caption?, tr+)>
<!ELEMENT tr - O (th|td)*>
<!ELEMENT (th|td) - O %body.content>
<!ATTLIST table -- table element --
align %Where; #IMPLIED -- table position relative to window --
width %Length #IMPLIED -- table width relative to window --
border %Pixels #IMPLIED -- controls frame width around table --
cellspacing %Pixels #IMPLIED -- spacing between cells --
cellpadding %Pixels #IMPLIED -- spacing within cells --
>
<!ELEMENT CAPTION - - (%text;)* -- table or figure caption -->
<!ATTLIST CAPTION
align (top|bottom) #IMPLIED
>
<!ATTLIST tr -- table row --
%cell.halign; -- horizontal alignment in cells --
%cell.valign; -- vertical alignment in cells --
>
<!ATTLIST (th|td) -- header or data cell --
nowrap (nowrap) #IMPLIED -- suppress word wrap --
rowspan NUMBER 1 -- number of rows spanned by cell --
colspan NUMBER 1 -- number of cols spanned by cell --
%cell.halign; -- horizontal alignment in cell --
%cell.valign; -- vertical alignment in cell --
width %Pixels #IMPLIED -- suggested width for cell --
height %Pixels #IMPLIED -- suggested height for cell --
>
<!--================ Document Head ========================================-->
<!-- %head.misc defined earlier on as "SCRIPT|STYLE|META|LINK" -->
<!ENTITY % head.content "TITLE & ISINDEX? & BASE?">
<!ELEMENT HEAD O O (%head.content) +(%head.misc)>
<!ELEMENT TITLE - - (#PCDATA)* -(%head.misc)
-- The TITLE element is not considered part of the flow of text.
It should be displayed, for example as the page header or
window title.
-->
<!ELEMENT ISINDEX - O EMPTY>
<!ATTLIST ISINDEX
prompt CDATA #IMPLIED -- prompt message -->
<!--
The BASE element gives an absolute URL for dereferencing relative
URLs, e.g.
<BASE href="http://foo.com/index.html">
...
<IMG SRC="images/bar.gif">
The image is deferenced to
http://foo.com/images/bar.gif
In the absence of a BASE element the document URL should be used.
Note that this is not necessarily the same as the URL used to
request the document, as the base URL may be overridden by an HTTP
header accompanying the document.
-->
<!ELEMENT BASE - O EMPTY>
<!ATTLIST BASE
href %URL #REQUIRED
>
<!ELEMENT META - O EMPTY -- Generic Metainformation -->
<!ATTLIST META
http-equiv NAME #IMPLIED -- HTTP response header name --
name NAME #IMPLIED -- metainformation name --
content CDATA #REQUIRED -- associated information --
>
<!-- SCRIPT/STYLE are place holders for transition to next version of HTML -->
<!ELEMENT STYLE - - CDATA -- placeholder for style info -->
<!ELEMENT SCRIPT - - CDATA -- placeholder for script statements -->
<!--================ Document Structure ===================================-->
<!ENTITY % version.attr "VERSION CDATA #FIXED '%HTML.Version;'">
<![ %HTML.Deprecated [
<!ENTITY % html.content "HEAD, BODY, PLAINTEXT?">
]]>
<!ENTITY % html.content "HEAD, BODY">
<!ELEMENT HTML O O (%html.content)>
<!ATTLIST HTML
%version.attr;
>
</pre>
<hr>
<h2><a name=latin1>Character Entities for ISO Latin-1</a></h2>
<pre>
<!-- (C) International Organization for Standardization 1986
Permission to copy in any form is granted for use with
conforming SGML systems and applications as defined in
ISO 8879, provided this notice is included in all copies.
This has been extended for use with HTML to cover the full
set of codes in the range 160-255 decimal.
-->
<!-- Character entity set. Typical invocation:
<!ENTITY % ISOlat1 PUBLIC
"ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML">
%ISOlat1;
-->
<!ENTITY nbsp CDATA "&#160;" -- no-break space -->
<!ENTITY iexcl CDATA "&#161;" -- inverted exclamation mark -->
<!ENTITY cent CDATA "&#162;" -- cent sign -->
<!ENTITY pound CDATA "&#163;" -- pound sterling sign -->
<!ENTITY curren CDATA "&#164;" -- general currency sign -->
<!ENTITY yen CDATA "&#165;" -- yen sign -->
<!ENTITY brvbar CDATA "&#166;" -- broken (vertical) bar -->
<!ENTITY sect CDATA "&#167;" -- section sign -->
<!ENTITY uml CDATA "&#168;" -- umlaut (dieresis) -->
<!ENTITY copy CDATA "&#169;" -- copyright sign -->
<!ENTITY ordf CDATA "&#170;" -- ordinal indicator, feminine -->
<!ENTITY laquo CDATA "&#171;" -- angle quotation mark, left -->
<!ENTITY not CDATA "&#172;" -- not sign -->
<!ENTITY shy CDATA "&#173;" -- soft hyphen -->
<!ENTITY reg CDATA "&#174;" -- registered sign -->
<!ENTITY macr CDATA "&#175;" -- macron -->
<!ENTITY deg CDATA "&#176;" -- degree sign -->
<!ENTITY plusmn CDATA "&#177;" -- plus-or-minus sign -->
<!ENTITY sup2 CDATA "&#178;" -- superscript two -->
<!ENTITY sup3 CDATA "&#179;" -- superscript three -->
<!ENTITY acute CDATA "&#180;" -- acute accent -->
<!ENTITY micro CDATA "&#181;" -- micro sign -->
<!ENTITY para CDATA "&#182;" -- pilcrow (paragraph sign) -->
<!ENTITY middot CDATA "&#183;" -- middle dot -->
<!ENTITY cedil CDATA "&#184;" -- cedilla -->
<!ENTITY sup1 CDATA "&#185;" -- superscript one -->
<!ENTITY ordm CDATA "&#186;" -- ordinal indicator, masculine -->
<!ENTITY raquo CDATA "&#187;" -- angle quotation mark, right -->
<!ENTITY frac14 CDATA "&#188;" -- fraction one-quarter -->
<!ENTITY frac12 CDATA "&#189;" -- fraction one-half -->
<!ENTITY frac34 CDATA "&#190;" -- fraction three-quarters -->
<!ENTITY iquest CDATA "&#191;" -- inverted question mark -->
<!ENTITY Agrave CDATA "&#192;" -- capital A, grave accent -->
<!ENTITY Aacute CDATA "&#193;" -- capital A, acute accent -->
<!ENTITY Acirc CDATA "&#194;" -- capital A, circumflex accent -->
<!ENTITY Atilde CDATA "&#195;" -- capital A, tilde -->
<!ENTITY Auml CDATA "&#196;" -- capital A, dieresis or umlaut mark -->
<!ENTITY Aring CDATA "&#197;" -- capital A, ring -->
<!ENTITY AElig CDATA "&#198;" -- capital AE diphthong (ligature) -->
<!ENTITY Ccedil CDATA "&#199;" -- capital C, cedilla -->
<!ENTITY Egrave CDATA "&#200;" -- capital E, grave accent -->
<!ENTITY Eacute CDATA "&#201;" -- capital E, acute accent -->
<!ENTITY Ecirc CDATA "&#202;" -- capital E, circumflex accent -->
<!ENTITY Euml CDATA "&#203;" -- capital E, dieresis or umlaut mark -->
<!ENTITY Igrave CDATA "&#204;" -- capital I, grave accent -->
<!ENTITY Iacute CDATA "&#205;" -- capital I, acute accent -->
<!ENTITY Icirc CDATA "&#206;" -- capital I, circumflex accent -->
<!ENTITY Iuml CDATA "&#207;" -- capital I, dieresis or umlaut mark -->
<!ENTITY ETH CDATA "&#208;" -- capital Eth, Icelandic -->
<!ENTITY Ntilde CDATA "&#209;" -- capital N, tilde -->
<!ENTITY Ograve CDATA "&#210;" -- capital O, grave accent -->
<!ENTITY Oacute CDATA "&#211;" -- capital O, acute accent -->
<!ENTITY Ocirc CDATA "&#212;" -- capital O, circumflex accent -->
<!ENTITY Otilde CDATA "&#213;" -- capital O, tilde -->
<!ENTITY Ouml CDATA "&#214;" -- capital O, dieresis or umlaut mark -->
<!ENTITY times CDATA "&#215;" -- multiply sign -->
<!ENTITY Oslash CDATA "&#216;" -- capital O, slash -->
<!ENTITY Ugrave CDATA "&#217;" -- capital U, grave accent -->
<!ENTITY Uacute CDATA "&#218;" -- capital U, acute accent -->
<!ENTITY Ucirc CDATA "&#219;" -- capital U, circumflex accent -->
<!ENTITY Uuml CDATA "&#220;" -- capital U, dieresis or umlaut mark -->
<!ENTITY Yacute CDATA "&#221;" -- capital Y, acute accent -->
<!ENTITY THORN CDATA "&#222;" -- capital THORN, Icelandic -->
<!ENTITY szlig CDATA "&#223;" -- small sharp s, German (sz ligature) -->
<!ENTITY agrave CDATA "&#224;" -- small a, grave accent -->
<!ENTITY aacute CDATA "&#225;" -- small a, acute accent -->
<!ENTITY acirc CDATA "&#226;" -- small a, circumflex accent -->
<!ENTITY atilde CDATA "&#227;" -- small a, tilde -->
<!ENTITY auml CDATA "&#228;" -- small a, dieresis or umlaut mark -->
<!ENTITY aring CDATA "&#229;" -- small a, ring -->
<!ENTITY aelig CDATA "&#230;" -- small ae diphthong (ligature) -->
<!ENTITY ccedil CDATA "&#231;" -- small c, cedilla -->
<!ENTITY egrave CDATA "&#232;" -- small e, grave accent -->
<!ENTITY eacute CDATA "&#233;" -- small e, acute accent -->
<!ENTITY ecirc CDATA "&#234;" -- small e, circumflex accent -->
<!ENTITY euml CDATA "&#235;" -- small e, dieresis or umlaut mark -->
<!ENTITY igrave CDATA "&#236;" -- small i, grave accent -->
<!ENTITY iacute CDATA "&#237;" -- small i, acute accent -->
<!ENTITY icirc CDATA "&#238;" -- small i, circumflex accent -->
<!ENTITY iuml CDATA "&#239;" -- small i, dieresis or umlaut mark -->
<!ENTITY eth CDATA "&#240;" -- small eth, Icelandic -->
<!ENTITY ntilde CDATA "&#241;" -- small n, tilde -->
<!ENTITY ograve CDATA "&#242;" -- small o, grave accent -->
<!ENTITY oacute CDATA "&#243;" -- small o, acute accent -->
<!ENTITY ocirc CDATA "&#244;" -- small o, circumflex accent -->
<!ENTITY otilde CDATA "&#245;" -- small o, tilde -->
<!ENTITY ouml CDATA "&#246;" -- small o, dieresis or umlaut mark -->
<!ENTITY divide CDATA "&#247;" -- divide sign -->
<!ENTITY oslash CDATA "&#248;" -- small o, slash -->
<!ENTITY ugrave CDATA "&#249;" -- small u, grave accent -->
<!ENTITY uacute CDATA "&#250;" -- small u, acute accent -->
<!ENTITY ucirc CDATA "&#251;" -- small u, circumflex accent -->
<!ENTITY uuml CDATA "&#252;" -- small u, dieresis or umlaut mark -->
<!ENTITY yacute CDATA "&#253;" -- small y, acute accent -->
<!ENTITY thorn CDATA "&#254;" -- small thorn, Icelandic -->
<!ENTITY yuml CDATA "&#255;" -- small y, dieresis or umlaut mark -->
</pre>
<hr>
<h2><a name=charset>Table of printable Latin-1 Character codes</a></h2>
<p><img src="images/latin1.gif">
<hr>
<h2><a name=acks>Acknowledgements</a></h2>
<p>The author would like to thank the members of the W3C HTML Editorial
Review Board, members of the W3C staff, and the many other people who
have contributed to this specification.
<hr>
<h2><a name=refs>Further Reading</a></h2>
<dl>
<dt><b>The World Wide Web Consortium</b>
<dd>Further information on W3C activities and pointers to the
status of work on HTML and HTTP etc. can be found at
<a href="http://www.w3.org/">http://www.w3.org/</a>.
Further information on HTML in particular can be found at
<a href="http://www.w3.org/pub/WWW/MarkUp/">http://www.w3.org/pub/WWW/MarkUp/</a>.
<dt><b>HTML 2.0 (RFC1866)</b><dd>
By Tim Berners-Lee and Dan Connolly, November 1995.
Defines the Hypertext Markup Language Specification Version 2.0.
Available from <a href="ftp://ds.internic.net/rfc/rfc1866.txt">ftp://ds.internic.net/rfc/rfc1866.txt</a>.
<dt><b>Form-based File Upload in HTML (RFC1867)</b><dd>
By E. Nebel and L. Masinter, November 1995. Describes extensions to
HTML 2.0 (RFC1866) to support file upload from HTML forms.
Available from <a href="ftp://ds.internic.net/rfc/rfc1867.txt">ftp://ds.internic.net/rfc/rfc1867.txt</a>.
<dt><b>HTML Tables (RFC1942)</b><dd>
By Dave Raggett, May 1996. This defines the HTML table model. It is a superset
of the table model defined by HTML 3.2.
Available from <a href="ftp://ds.internic.net/rfc/rfc1942.txt">ftp://ds.internic.net/rfc/rfc1942.txt</a>,
or as a W3C working draft at <a href="http://www.w3.org/pub/WWW/TR/WD-tables">http://www.w3.org/pub/WWW/TR/WD-tables</a>.
<dt><b>A Lexical Analyzer for HTML and Basic SGML</b><dd>
By Dan Connolly, June 1996. Describes lexical considerations for parsing
HTML documents. Available from <A HREF="http://www.w3.org/pub/WWW/TR/WD-html-lex">http://www.w3.org/pub/WWW/TR/WD-html-lex</A>
<dt><b>The Hypertext Transfer Protocol (HTTP)</b>
<dd>Further information of HTTP can be found at:
<a href="http://www.w3.org/pub/WWW/Protocols">http://www.w3.org/pub/WWW/Protocols</a>.
<dt><b>A Standard Default Color Space for the Internet - sRGB</b><dd>
By Michael Stokes, Mathew Anderson, Srinivasan Chandrasekar and Ricardo
Motta, November 1996. Available from:
<a href="http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html">http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html</a>
This provides a precise definition for RGB that allows sRGB images
to be reproduced accurately on different platforms and media under varying
ambient lighting conditions.
</dl>
<P>
<A href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Copyright">
Copyright</A> © 1997 <A href="http://www.w3.org">W3C</A>
(<A href="http://www.lcs.mit.edu">MIT</A>,
<A href="http://www.inria.fr/">INRIA</A>,
<A href="http://www.keio.ac.jp/">Keio</A> ), All Rights Reserved. W3C
<A href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Legal Disclaimer">liability,</A>
<A href="http://www.w3.org/Consortium/Legal/ipr-notice.html#W3C Trademarks">trademark</A>,
<A href="http://www.w3.org/Consortium/Legal/copyright-documents.html">document
use </A>and
<A href="http://www.w3.org/Consortium/Legal/copyright-software.html">software
licensing </A>rules apply.
</P>