HTML5基础—常用标签(一)

1.<!DOCTYPE html> 是html5标准网页声明

2.普通标记(双标记):成对出现,如<head>..</head>,<title>...</title>

3.空标记(单标记):如<br> 或者<br />

4.html5文档的基本结构:

<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
...
</body>
</html>

<head>之间是文档头
<body>之间是文档体

5.head部分可以包含<title>、<base>、<link>、<style>、<script>、<meta>等标记

6.网页标题<title>(双标记)

<title>....</title>

7.定义元数据<meta>(单标记)

<meta>标记所定义的信息不会出现在网页中,仅在源文件中显示。

<meta charset="UTF-8" /> 网页使用UTF-8字符集
<meta name="keywords" content="计算机,WEB,HTML"> 向搜索引擎提供网页的关键字
<meta name="description" content="关于WEB的知识点"> 对网页的基本描述
<meta name="revised" content="tomcat8.0" /> 可以定义网页的最新版本
<meta http-equiv="refresh" content="秒" [url="资源路径"] />
如:
<meta http-equiv="refresh" content="5" /> 5秒刷新一次本页面
<meta http-equiv="refresh" content="10" url="http://www.baidu.com" /> 10秒后跳转至百度

8.HTML5新增标记:

页眉:<header>...</header>

页脚:<footer>...</footer>

导航栏:<nav>...</nav>

分组与主题有关的内容:<section>...</section>

分组与主题无关的内容:<aside>...<aside>

用于容纳可聚合的内容:<article>...<article>

发布了32 篇原创文章 · 获赞 17 · 访问量 4909

猜你喜欢

转载自blog.csdn.net/mango_ZZY/article/details/100125747