Html 5 - Section , header - validatie
krijg deze meldingen:
Error: Start tag seen without seeing a doctype first. Expected <!DOCTYPE html>.
From line 1, column 1; to line 1, column 20
<div class="widget">? <
Error: Element head is missing a required instance of child element title.
From line 1, column 1; to line 1, column 20
<div class="widget">? <
Content model for element head:
If the document is an iframe srcdoc document or if title information is available from a higher-level protocol: Zero or more elements of metadata content.
Otherwise: One or more elements of metadata content, of which exactly one is a title element.
There were errors. (Tried in the text/html mode.)
Verwacht niet te veel van de HTML5 validator aangezien deze nog in ontwikkeling is volgens W3C...
Source
Volledige code:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>titel</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="widget">
<header>
<h2>Uw site's:</h2>
</header>
<section>
test
</section>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>titel</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="widget">
<header>
<h2>Uw site's:</h2>
</header>
<section>
test
</section>
</div>
</body>
</html>
Gewijzigd op 19/02/2011 14:09:48 door Jasper DS
html 5 doctype is gewoon : <!DOCTYPE html> zonder al die andere zooi.
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>titel</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<div class="widget">
<header>
<h2>Uw site's:</h2>
</header>
<section>
test
</section>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>titel</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<div class="widget">
<header>
<h2>Uw site's:</h2>
</header>
<section>
test
</section>
</div>
</body>
</html>
edit: hij is volgens w3c volledig valid nu!
Gewijzigd op 19/02/2011 14:12:14 door Jasper DS
Ik weet niet of ik me nu al van alles van HTML5 aan zou gaan leren, aangezien er in de developement nog best het een en ander kan veranderen denk ik.