Mån*_*son 1 html css validation html5
有人可以解释为什么这个HTML文档不会验证为HTML5(使用http://validator.w3.org/)?我得到三个错误:
<!DOCTYPE html> //Random comment
<html lang="sv"> //Random comment
<head>
<meta charset="utf-8" /> //Random comment
<title>Startsida - Läxhjälpen</title> //Random comment
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="laxhjalpen.css" rel="stylesheet" /> //Random comment
</head>
<body class="startpage"> //Random comment
<header> //Random comment
<div class="hwrap"> //Random comment
<a href="./"><img class="logo" alt="Startsidan" src="./Images/laxlogo.png" /></a> //Random comment
<h1>Läxhjälpen</h1> //Random comment
</div>
<p class="tagline">Vi hjälper dig att förstå!</p> //Random comment
</header>
//Random comment
<section class="menu"> //Random comment
<h2><a href="om-oss.html">Om oss <span style="color:blue;">〠</span></a></h2>
<p>Man måste inte vara plugghäst för att kunna plugga. Vi själva är exempel på det.</p>
</section>
<section class="menu"> //Random comment
<h2><a href="arbeten.html">Vad vi gör <span style="color:grey;">⌘</span></a></h2>
<p>Vi hjälper dig att plugga alla ämnen i skolan och förbereda dig för prov på bästa möjliga sätt.</p>
</section>
<section class="menu"> //Random comment
<h2><a href="blog.php">Blogg ✪</a></h2>
<p>Ta del av andra människors erfarenheter med vår tjänst.</p>
</section>
<section class="menu"> //Random comment
<h2><a href="contact.php">Kontakt ☎</a></h2>
<p>Kontaktformulär, telefonnummer och adresser för att kontakta oss.</p>
</section>
<footer>
<small>© Måns Nilsson AB</small> //Random comment
</footer>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
//Random comment
不是HTML中的评论.这是文字内容.由于这样的内容只允许在正文(和标题)中,因此会生成一个包含头元素(没有标题)和body元素的html元素.
(请注意,虽然html,head和body 元素是必需的,但这些元素的开始和结束标记是可选的.标题元素的开始和结束标记是强制性的,这就是文本最终在正文中而不是标题的原因)
<!-- This is an HTML comment -->
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
417 次 |
最近记录: |