meta元素的各种用法
1.指定网页编码
<meta charset="UTF-8">
2.为了让网页尺寸实现自适应
<meta name="viewport" content="width=device-width, initial-scale=1.0">
3.定义网页的作者
<meta name="author" content="lan">
这里content里的内容,自己按自己的实际填写
4.描述网页内容
<meta name="description" content="html">
5.每 5 秒刷新一下浏览器并跳转到指定页面
<meta http-equiv="refresh" content="5;http://www.baidu.com">
代码实例
<!DOCTYPE html>
<html>
<title>html</title>
<!--指定网页编码-->
<meta charset="UTF-8">
<!--为了让网页尺寸实现自适应-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--定义网页的作者-->
<meta name="author" content="lan">
<!--描述网页内容-->
<meta name="description" content="html">
<!--每 5 秒刷新一下浏览器并跳转到指定页面-->
<meta http-equiv="refresh" content="5;http://www.baidu.com">
<body>
<h1>自适应演示</h1>
<p>在pc端,移动端分别打开</p>
<img src="timg (27).jpg" alt="zhu-Logo" width="200px" height='300px' />
<p> lan-网址<a href="http://www.baidu.com" target="_blank">百度传送门</a></p>
<p>In the car, I heard the tour guide said we are going to the Riverside Forest Park has the Three Parallel Rivers of the landscape, but this place is very charming too!bai Last! I walked into the door, my eyes is the first thing many lush plants, pink
peach flowers are brilliant, refreshing flavor. I came closer, peach has six petals, yellow stamens yellow in the middle, surrounded with flowers, truly beautiful.</p>
</body>
</html>
关于网页的作者,描述网页内容这些,在浏览器打开是看不到的,爬虫是才看得到。
5秒后自动跳转到百度