html的meta元素的各种用法

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秒后自动跳转到百度
在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值