Python实战第一天:做一个网页

最终成果:

我的代码:

<!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">
<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 style="text-align: center">The Beach</h2>
<hr/>
<ul class="photos">
<li>
<img src="images/0001.jpg" width="150" height="150" alt="pic1">
</li>
<li>
<img src="images/0003.jpg" width="150" height="150" alt="pic2">
</li>
<li>
<img src="images/0004.jpg" width="150" height="150" alt="pic3">
</li>
</ul>
<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>

总结:

1.常用HTML标签的用法:

 HTML 标题(Heading)是通过 <h1>标题 <h6> 等标签进行定义的。从h1到h6标题的字号依次变小,而且只有这六个等级

标签<p>段落</p>定义段落

标签,<a href="https://www.baidu.com/"></a> 定义链接

标签<ul>导航</ul>定义导航

标签<img src="图片地址" width=“宽度”, height=“高度”>定义图片,width和height可以不写,就按照图片的原样大小插入图片

注意:标签一般都是成对出现的,所以最好都用成对的标签

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 14,680评论 1 92
  • 转载请声明 原文链接地址 关注公众号获取更多资讯 第一部分 HTML 第一章 职业规划和前景 职业方向规划定位...
    前端进阶之旅阅读 16,685评论 32 459
  • 教程整理自慕课网(原文部分错误在这篇文章得到修改,本文版本Bootstrap3.3.7)。 框架简介 Bootst...
    小小奶狗阅读 7,317评论 0 5
  • HTML5 标签comment 注释标签用于在源文档中插入注释。注释内容不会被浏览器显示。为代码编写注释的好处是...
    才気莮孒阅读 9,523评论 1 25
  • 时间:2016.11.5(云10年)星期六,第158天 空间:草海 天气:晴 每一个人在成长历程中,每一件事的成功...
    王子他说阅读 3,593评论 0 50