HTML / XHTML / WML / XML Validator |
||||||||||||||||||
| de | en | ||||||||||||||||||
|
||||||||||||||||||
Ab hier folgen Beispiele mit fehlerhaften Farbangaben. Folgende Attribute werden überprüft: bgcolor text link vlink alink color | |||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>illegal color values</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body bgcolor="123456"></body>
11: </html>
| In diesem Beispiel fehlt die führende "#", ein häufig auftretender Fehler. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>illegal color values2</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body vlink="#abcdeG"></body>
11: </html>
| Hexadezimalzahlen dürfen nur die Zahlen 0-9 und die Ziffern a-f oder A-F enthalten. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>illegal color values3</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body bgcolor="#12345"></body>
11: </html>
| Hexadezimale Farbwerte müssen exakt 6 Stellen besitzen (ohne "#"). | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>illegal color values4</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body bgcolor="#1234567"></body>
11: </html>
| Hexadezimale Farbwerte müssen exakt 6 Stellen besitzen (ohne "#"). In diesem Beispiel ist der Farbwert 7-Stellig. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>illegal color name</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body>
11: <font color="BLAK"></font>
12: </body>
13: </html>
| Neben Hexadezimalen Farbangaben sind auch 16 Farbnamen erlaubt: Black entspricht "#000000" Green entspricht "#008000" Silver entspricht "#C0C0C0" Lime entspricht "#00FF00" Gray entspricht "#808080" Olive entspricht "#808000" White entspricht "#FFFFFF" Yellow entspricht "#FFFF00" Maroon entspricht "#800000" Navy entspricht "#000080" Red entspricht "#FF0000" Blue entspricht "#0000FF" Purple entspricht "#800080" Teal entspricht "#008080" Fuchsia entspricht "#FF00FF" Aqua entspricht "#00FFFF" | ||||||||||
Ab hier folgen Beispiele mit Attributen in denen Pixelangaben, prozentuale und relative Werte erlaubt sind. Folgende Attribute werden überprüft: width height charoff cellspacing cellpadding | |||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>illegal width value</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body>
11: <table width="100px">
12: <tr>
13: <td></td>
14: </tr>
15: </table>
16: </body>
17: </html>
| Im Tag width sind nur ganze Zahlen oder prozentuale (z.B. 20%) Werte erlaubt | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>illegal width value</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body>
11: <table width="1*">
12: <tr>
13: <td></td>
14: </tr>
15: </table>
16: </body>
17: </html>
| In width-Attributen sind relative Werte nicht zugelassen. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>illegal height value</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body>
11: <table>
12: <tr>
13: <td height="-100"></td>
14: </tr>
15: </table>
16: </body>
17: </html>
| Negative Werte sind natürlich nicht erlaubt. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>illegal cellspacing value</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body>
11: <table cellspacing="-10%">
12: <tr>
13: <td></td>
14: </tr>
15: </table>
16: </body>
17: </html>
| Negative prozentuale Werte sind selbstverständlich auch nicht erlaubt. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>illegal width value</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <table border="1"> 12: <colgroup width="1*"> 13: <col width="foo"> 14: <col width="*"> 15: <col width="2*"> 16: <col width="100"> 17: <col width="10%"> 18: </colgroup> 19: <tr> 20: <td>1. Line, 1. Column</td> 21: <td>1. Line, 2. Column</td> 22: <td>1. Line, 3. Column</td> 23: <td>1. Line, 4. Column</td> 24: <td>1. Line, 5. Column</td> 25: </tr> 26: </table> 27: </body> 28: </html> | Width-Attribute dürfen in col und colgroup-Tags auch relative Werte enthalten. | ||||||||||
Ab hier folgen Beispiele mit Attributen in denen nur Integerwerte (Ganzzahlen) erlaubt sind. Folgende Attribute werden überprüft: border hspace vspace size rows cols span rowspan colspan marginwidth marginheight | |||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>illegal size value</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body>
11: <hr size="100%">
12: </body>
13: </html>
| Prozentuale Werte sind in Integer-Attributen unzulässig. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>legal size value</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body>
11: <font size="-5"></font>
12: </body>
13: </html>
| In font und basefont-Tags darf das size-Attribut ein Vorzeichen (+-) enthalten. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>illegal hspace and vspace values</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <img src="/foo.gif" alt="" hspace="-10" vspace="1*"> 12: </body> 13: </html> | Ebensowenig sind negative oder relative Werte in Integer-Attributen erlaubt. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>illegal rows and cols value</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <textarea rows="-2" cols="2*"></textarea> 12: </body> 13: </html> | Auch in rows und cols-Attributen sind negative oder relative Werte nicht erlaubt. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" 2: "http://www.w3.org/TR/html4/frameset.dtd"> 3: 4: <html> 5: <head> 6: <title>legal rows and cols value in frameset-Tag</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <frameset cols="50%,*,10,1*" rows="50%,*,10,1*"> 11: <frame> 12: </frameset> 13: </html> | Im Frameset-Tag dürfen die rows und cols-Attribute Integer, prozentuale und relative Werte enthalten. Diese dürfen, durch Kommata getrennt, auch mehrfach vorkommen. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" 2: "http://www.w3.org/TR/html4/frameset.dtd"> 3: 4: <html> 5: <head> 6: <title>illegal rows and cols value in frameset-Tag</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <frameset cols=",50%,*,10,1*" rows="50%,*,10,1*,"> 11: <frame> 12: </frameset> 13: </html> | Die Attributwerte dürfen durch Kommata getrennt sein, jedoch nicht als erstes oder letztes vorkommen. | ||||||||||
Ab hier folgen Beispiele mit dem area-Tag und den Attributen shape und coords.
| |||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>coords missing</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <map name="foo"> 12: <area shape="rect" href="http://foo.com" alt=""> 13: <area shape="default" href="http://foo.com" alt=""> 14: </map> 15: </body> 16: </html> | Wenn das shape-Attribut den Wert "rect" oder "default" enthält, darf das Attribut coords fehlen. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>illegal coords value</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <map name="foo"> 12: <area shape="rect" coords="1,2,3,4" href="http://foo.com" alt=""> 13: <area shape="default" coords="1,2,3" href="http://foo.com" alt=""> 14: <area shape="rect" coords="1,2,3,4,5" href="http://foo.com" alt=""> 15: </map> 16: </body> 17: </html> | Da ein Rechteck unstrittig 4 Ecken besitzt, muss das Attribut coords 4 Werte besitzen. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>illegal coords value</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <map name="foo"> 12: <area shape="default" coords="1,2,3,4," href="http://foo.com" alt=""> 13: <area shape="rect" coords=",1,2,3,4" href="http://foo.com" alt=""> 14: </map> 15: </body> 16: </html> | Die Attributwerte dürfen durch Kommata getrennt sein, jedoch nicht als erstes oder letztes vorkommen. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>illegal coords value</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <map name="foo"> 12: <area shape="circle" coords="1,2,3" href="http://foo.com" alt=""> 13: <area shape="circle" coords="1,2" href="http://foo.com" alt=""> 14: <area shape="circle" coords="1,2,3,4" href="http://foo.com" alt=""> 15: </map> 16: </body> 17: </html> | Wenn das Attribut shape den Wert circle enthält, dann muss das Attribut coords genau 3 Werte besitzen. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>illegal coords value</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <map name="foo"> 12: <area shape="circle" coords=",1,2,3" href="http://foo.com" alt=""> 13: <area shape="circle" coords="1,2,3," href="http://foo.com" alt=""> 14: </map> 15: </body> 16: </html> | Auch wenn shape="cirle" lautet, dürfen die Werte im coords-Attribut nicht mit Kommata beginnen oder enden. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>illegal coords value</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <map name="foo"> 12: <area shape="poly" coords="1,2,3,4,5,6" href="http://foo.com" alt=""> 13: <area shape="poly" coords="1" href="http://foo.com" alt=""> 14: <area shape="poly" coords="1,2,3" href="http://foo.com" alt=""> 15: </map> 16: </body> 17: </html> | Wenn das Attribut shape den Wert poly enthält, dann muss das Attribut coords mindestens 2 Werte besitzen. Weiterhin muss die Anzahl der Werte eine gerade Zahl sein (2,4,6,8...). | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>illegal coords value</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <map name="foo"> 12: <area shape="poly" coords=",1,2,3,4" href="http://foo.com" alt=""> 13: <area shape="poly" coords="1,2,3,4," href="http://foo.com" alt=""> 14: </map> 15: </body> 16: </html> | Wenn shape="poly" lautet, dürfen die Werte im coords-Attribut nicht mit Kommata beginnen oder enden. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>illegal coords value</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <map name="foo"> 12: <area coords="1,2,3,-4" href="http://foo.com" alt=""> 13: <area shape="rect" coords="*1,2,3,4" href="http://foo.com" alt=""> 14: <area shape="circle" coords="1,2%,3" href="http://foo.com" alt=""> 15: <area shape="poly" coords="1,2,3,f,5,6" href="http://foo.com" alt=""> 16: </map> 17: </body> 18: </html> | Coords-Attribute dürfen nur ganzahlige Werte enthalten. Vorzeichen, relative und prozentuale Werte sind nicht erlaubt. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>illegal coords value</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body>
11: <map name="foo">
12: <area shape="foo" coords="1,2,3" href="http://foo.com" alt="">
13: <area shape="default" coords="1,2,3,4" href="http://foo.com" alt="">
14: <area shape="rect" coords="1,2,3,4" href="http://foo.com" alt="">
15: <area shape="circle" coords="1,2,3" href="http://foo.com" alt="">
16: <area shape="poly" coords="1,2,3,4,5,6" href="http://foo.com" alt="">
17: </map>
18: </body>
19: </html>
| Im Attribut shape sind nur die Werte default, rect, circle und poly erlaubt. | ||||||||||
HTTP-Header: Content-Type: text/html; charset=ISO-8859-1 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2: "http://www.w3.org/TR/html4/loose.dtd"> 3: 4: <html> 5: <head> 6: <title>invalid country code</title> 7: <meta http-equiv="Content-Type" content="text/html; 8: charset=iso-8859-1"> 9: </head> 10: <body> 11: <p lang="en"> 12: <p lang="us-en"> 13: <p lang="en-us"> 14: <p lang="xx"> 15: <p lang="en-xx"> 16: <p lang="xx-en"> 17: </body> 18: </html> | Laut Spezifikation 2 sind im lang-Attribut nur bestimmte Ländercodes erlaubt. | ||||||||||
HTTP-Header: Content-Type: application/xhtml+xml; charset=UTF-8 1: <?xml version="1.0" encoding="utf-8"?> 2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 4: <html> 5: <head> 6: <title>missing xmlns-Attribut</title> 7: </head> 8: <body> 9: <p>...</p> 10: </body> 11: </html> | In einen XHTML-Dokument ist das xmlns-Attribut vorgeschrieben. | ||||||||||
| Datenschutzerklärung | |