1: <?xml version="1.0" encoding="utf-8"?>
2: <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
3: "http://www.wapforum.org/DTD/wml13.dtd">
4:
5: <wml>
6: <card title="Validator">
7: <do type="prev" label="Back">
8: <prev/>
9: </do>
10: <p align="center">
11: Hello world!
12: <br />
13: </p>
14: </card>
15: </wml>
| A WML-document for common tests. |
1: <?xml version="1.0" encoding="ISO-8859-1"?>
2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4:
5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
6: <head>
7: <title>incomplete Entity</title>
8: </head>
9: <body>
10: <div title="&"></div>
11: </body>
12: </html>
| Entities have to end with a ";". |
1: <?xml version="1.0" encoding="iso-8859-1"?>
2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4:
5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
6: <head>
7: <title>no attribute space</title>
8: </head>
9: <body>
10: <p class="CLASS"title='TITLE'/>
11: <!--<p class="CLASS"title='TITLE'/>-->
12: <div><![CDATA[<p class=''title=''></p>]]></div>
13: </body>
14: </html>
| XML- and XHTML-documents must have White Spaces between the Attributes. |
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>no attribute space</title>
7: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
8: </head>
9: <body>
10: <p class="CLASS"title='TITLE'></p>
11: </body>
12: </html>
| In HTML-documents no White Spaces between Attributes are needed. |
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>missing Anchor</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10:
11: <frameset>
12: <frame id="FRAME-Tag" name="frame-Tag">
13: <frame id="FRAME-Tag2" name="FRAME-Tag2">
14: <noframes>
15: <a id="A-Tag" name="a-Tag" href=""></a>
16: <applet id="APPLET-Tag" name="applet-Tag" width="1" height="1"></applet>
17: <form id="FORM-Tag" name="form-Tag" action=""></form>
18: <img id="IMG-Tag" name="img-Tag" src="" alt="">
19: <map id="MAP-Tag" name="map-Tag"><p></map>
20: <iframe id="IFRAME-Tag" name="iframe-Tag" src=""></iframe>
21:
22: <a id="A-Tag2" name="A-Tag2" href=""></a>
23: <applet id="APPLET-Tag2" name="APPLET-Tag2" width="1" height="1"></applet>
24: <form id="FORM-Tag2" name="FORM-Tag2" action=""></form>
25: <img id="IMG-Tag2" name="IMG-Tag2" src="" alt="">
26: <map id="MAP-Tag2" name="MAP-Tag2"><p></map>
27: <iframe id="IFRAME-Tag2" name="IFRAME-Tag2" src=""></iframe>
28: </noframes>
29: </frameset>
30: </html>
| Id- and name-Attributes which are used at the same time
in the Tags "a", "applet", "form", "frame", "iframe", "img" and "map" must have identical values
(also according to upper and lower case).. |
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>unclosed Starttag</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body>
11: <a href="http://foo.com">
12: <img src="test.gif" alt=""
13: </a>
14: </body>
15: </html>
| All Tags should be closed with > |
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>no error</title>
7: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
8: </head>
9: <body />
10: </html>
| An Error, that is often made, is using XHTML-syntax in HTML-documents. These Errors should be reported. |
1: EF BB BFEF BB BF<?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:
5: <html xmlns="http://www.w3.org/1999/xhtml">
6: <head>
7: <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8: <title>double utf-8 bom</title>
9: </head>
10: <body>
11: <p>...</p>
12: </body>
13: </html>
| The Byte Order Mark (BOM) should appear only once in the document. |
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:
5: <html xmlns="http://www.w3.org/1999/xhtml">
6: <head>
7: <title>Illegal Char-Reference</title>
8: </head>
9: <body>
10: <p></p>
11: <p>�</p>
12: <p>�</p>
13: <p></p>
14: <p></p>
15: <p>𐀀</p>
16: <p></p>
17: <p>�</p>
18: </body>
19: </html>
| Character references which are not allowed must be recognized during processing by a validator. |
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 xmlns="http://www.w3.org/1999/xhtml">
5: <head>
6: <title></title>
7: </head>
8: <body>
9: <p><?xml?></p>
10: </body>
11: </html>
| Invalid XML processing instructions must be detected by validator. |
1: <?xml version='1.0' encoding='UTF-8'?>
2: <?xml-stylesheet href="classic.css" alternate="yes" title="Classic" media="screen, print" type="text/css" charset="utf-8"?>
3: <?xml-stylesheet href="" type="" title this is a error ?>
4: <?xml-stylesheet href="classic.css" alternate="yes"title="Classic" media="screen, print" type="text/css"?>
5: <?xml-stylesheet href="classic.css" alternate="foo" title="Classic" media="screen, print" type="text/css"?>
6: <?xml-stylesheet alternate="yes" title="Classic" media="screen, print" type="text/css"?>
7: <?xml-stylesheet href='classic.css" alternate="yes" title="Classic" media="screen, print" type="text/css"?>
8: <?xml-stylesheet href="classic.css" alternate="yes" title=Classic media="screen, print" type="text/css"?>
9: <?xml-stylesheet href="classic.css" alternate="yes" title="Classic" media="screen, print" type="text/css" foo='foo'?>
10:
11: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
12: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
13:
14: <html xmlns="http://www.w3.org/1999/xhtml">
15: <head>
16: <?xml-stylesheet Href="common.css" type="text/css"?>
17: <?xml?>
18: <?xml version='1.0' encoding='UTF-8'?>
19: <title></title>
20: </head>
21:
22: <body/>
23: </html>
| Unallowed processing instructions should be detected. |
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:
5: <html xmlns="http://www.w3.org/1999/xhtml">
6: <head>
7: <title></title>
8: </head>
9: <body>
10: <p>
11: <a href="/foo">
12: <em>
13: <a href="/foo">foo</a>
14: </em>
15: </a>
16: </p>
17: </body>
18: </html>
| It is not allowed to nest an a-Tag in a precedent a-Tag. |
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:
5: <html xml:lang="de" lang="de" xmlns="http://www.w3.org/1999/xhtml">
6: <head>
7: <title>missing Script-Type</title>
8: </head>
9:
10: <body onload="" />
11: </html>
| Documents without information upon standard script language and containing elements, which specify scripts for embedded events, are not valid. |
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:
5: <html xml:lang="de" lang="de" xmlns="http://www.w3.org/1999/xhtml">
6: <head>
7: <meta http-equiv="Content-Script-Type" content="text/javascript" />
8: <title>Script-Type in meta-Tag</title>
9: </head>
10:
11: <body onload="" />
12: </html>
| If standard script language is specified within meta-tag, this declaration is the decisive factor. |
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:
5: <html xml:lang="de" lang="de" xmlns="http://www.w3.org/1999/xhtml">
6: <head>
7: <title>Script-Type only in HTTP-Header</title>
8: </head>
9:
10: <body onload="" />
11: </html>
| If standard script language is not specified within meta-tag, but delivered by HTTP-Header, the header definition is used. |
1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3:
4: <html xmlns="http://www.w3.org/1999/xhtml">
5: <head>
6: <title></title>
7: </head>
8: <body>
9: <del>
10: <p></p>
11: <span></span>
12: <p></p>
13: </del>
14:
15: <ins>
16: <p></p>
17: <span></span>
18: <p></p>
19: </ins>
20:
21: <p>
22: <ins>
23: <span></span>
24: </ins>
25: </p>
26:
27: <p>
28: <del>
29: <span></span>
30: <p></p>
31: <span></span>
32: </del>
33: </p>
34:
35: <div>
36: <span>
37: <ins>
38: <span></span>
39: <p></p>
40: <span></span>
41: </ins>
42: </span>
43: </div>
44: </body>
45: </html>
| Both elements - ins and del - have an exceptional position: They may occur either within block elements (in this caase they act as inline elements and may not contain any block elments)
Or they occur outside of block elements - then, they act as block elements and may enclose other block elements (including their content), but no inline elements. |