有效的HTML 5示例

3
我正在寻找一个以xml格式呈现的html 5文档,该文档被以下工具认为是有效的: 如果存在这样的文档,是否有人可以提供给我,或者解释哪些验证器不符合标准。 我找到的最好的文档如下:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
    dir="ltr">
<head>
<meta name="description"
    content="application/xhtml+xml; charset=UTF-8" />
<title>Get an object</title>
</head>
<body>
    <section>This is a section</section>
</body>

请注意,文档包含一个仅在HTML5中有效的section元素。该文档不适用于Eclipse和Firefox。
问候, Mickaël
谢谢您提供的有用链接igo: http://docs.webplatform.org/wiki/html/tutorials 我了解到,即使高度推荐使用xhtml语法,包括xml头行也可能会对某些浏览器造成问题。因此,我将其删除,并且以下代码被所有验证器验证通过,eclipse使用xml约束验证它为html5。
<!DOCTYPE html>
<html lang="en"
    dir="ltr">
<head>
<meta name="description"
    content="application/xhtml+xml"/>
<meta charset="UTF-8"/>

<title>Get an object</title>
</head>
<body>
    <section>This is a section</section>
</body>
</html>

你使用的 Firefox 和 Eclipse 版本中是否实现了 section 标签? - arkascha
1个回答

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接