实战计划第一天,做了一个网页。
最终成果是这样的:
我的代码:
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>The blah</title>
<link rel="stylesheet" type="text/css" href="homework.css">
</head>
<body>
<div class="header">
<img src="images/blah.png">
<ul class="nav">
<li><a href="#">home</a></li>
<li><a href="#">site</a></li>
<li><a href="#">other</a></li>
</ul>
</div>
<div class="main-content">
<h2>The Beach</h2>
<ul class="photos">
<img src="images/0001.jpg" width="150" height="150">
<img src="images/0003.jpg" width="150" height="150">
<img src="images/0004.jpg" width="150" height="150">
</ul>
<p>A wolf had been badly wounded by dogs.
He lay sick and maimed in his lair.He felt very hungry and thirsty.
When a sheep passed by, he asked him to fetch some water from the stream.
"If you bring me the water," he said, "I will find means to get some food.""Yes," said the sheep,
"if I bring you the water, you would undoubtedly make me your food."</p>
</div>
<div class="footer">
<p>©wangyuan</p>
</div>
</body>
</html>
总结
- HTML是比较宽松的web标准,不加/也可以,XHTML就比较严格,要求一定要有/作为结束
- “#”表示不跳转