最终成果
QQ20160626-0.png
我的代码
<!DOCTYPE html>
<html lang="en">
<head> <!--网页中不可见 -->
<meta charset="UTF-8">
<title>The blah</title>
<link rel="stylesheet" type="text/css" href="homework.css"> <!-- 引用样式-->
</head>
<body> <!-- 网页中可见-->
<div class="header"> <!-- div(划分区域)-->
<img src="images/blah.png">
<ul class="nav"> <!-- 无序列表-->
<li><a href="#">Home</a></li> <!--li(列表项目),a(连接) -->
<li><a href="#">Site</a></li>
<li><a href="#">Other</a></li>
</ul>
</div>
<div class="main-content">
<h2>The Beach</h2>
<hr> <!--下划线,只有开始标签,无结束标签-->
<ul class="photos">
<li><img src="images/0001.jpg" width="150" height="150" ></li>
<li><img src="images/0003.jpg" width="150" height="150" ></li>
<li><img src="images/0004.jpg" width="150" height="150" ></li>
</ul>
<p> <!-- p(插入文字)-->
stretching from Solta to Mljet, and this unique cycling trip captures the highlights with an ideal
balance of activity, culture and relaxation. Experience the beautiful island of Korcula with its picturesque old town,
the untouched beauty of Vis, and trendy Hvar with its Venetian architecture. In the company of a cycling guide,
this stimulating journey explores towns and landscapes, many of which are on UNESCO's world heritage list.
Aboard the comfortably appointed wooden motor yacht,
there is ample time between cycles to swim in the azure waters and soak up the ambience of seaside towns.
</p>
</div>
<div class="footer">
<p>© Mugglecoding</p>
</div>
</body>
</html>
总结
- PyCharm创建网页文件时open选择html所在文件夹(包括.html,.css和images文件夹),问不是点html文件
- html可以引用样式文件.css
- 标签可以嵌套标签
网友评论