<!doctype html>
<html>
代码
<!doctype html>
<html>
<head>
<title>第一个程序</title>
<meta name ="keywords" content="学习,web开发,html">
<meta name="description" content="这是一个有关于web开发的网站">
<meta http-equiv="refresh" content="5;https://fishc.com.cn/">
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="icon" type="image/x-icon" href="img/web.ico">
<script tyep="text/javascript" src="hi.js"></script>
</head>
<body>
<img alt="这是一个图片1" src="img/tupian.jpg" width="256px" longth="256px">
<a href="https://ilovefishc.com/html5/" target="_blank">这是一个学习网站</a>
<h1>hello world</h1>
<script type="text/javascript">
document.write("i love you 我爱你")
</script>
<p>上面的内容哪来的? </p>
</body>
心得
1 html分为head和body两部分
2 meta中的keywords和description是对网站的描述,对于爬虫很重要。
3 meta中的http-equip=“refresh”很重要其中content对应的是时间
4 link可以来链接css文件
5 a是用来链接外部超链接网站的 href后面是网址 其中target=“-blank“是在新的标签页打开
6 空标签有 img meta link等
7 h是标题 p是段落
8 学习了块级元素和行内元素其中p是块级元素而a是行内元素
<br>是换行 <span>行内元素中的<p>
9 body中的空白只能保留一个