HTML学习(四)H5语义元素及琐碎知识
一、H5语义元素
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>h5语义元素</title>
</head>
<body>
节(section)是有主题的内容组,通常具有标题
<section>
<h1>WWF</h1>
<p>The World Wide Fund for Nature (WWF) is....</p>
</section>
article元素规定独立的自包含内容
<article>
<h1>What Does WWF Do?</h1>
<p>WWF's mission is to stop the degradation of our planet's natural environment,
and build a future in which humans live in harmony with nature.</p>
</article>
</body>
</html>
二、琐碎知识
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--把用户重定向到新的网址-->
<!--<meta http-equiv="Refresh" content="5;url=http://www.baidu.com" /> -->
<title>html琐碎</title>
<!--<base> 标签为页面上的所有链接规定默认地址或默认目标(target)-->
<base href="http://www.baidu.com" />
<base target="_blank" /> <!--会使所有链接在新标签打开,即使a标签的target没有设置为_blank-->
</head>
<!--
已经不推荐这样!!!在css中设置更好!!!
三种方式设置背景颜色
<body bgcolor="#000000">
<body bgcolor="rgb(0,0,0)">
<body bgcolor="black">
设置背景
<body background="clouds.gif">
文字设置颜色
text="#f0f8ff"
-->
<body bgcolor="black" text="#f0f8ff">
<h1>hello color</h1>
<p>
对不起。我们已经搬家了。您的 URL 是 <a href="http://www.w3school.com.cn">http://www.w3school.com.cn</a>
</p>
<p>您将在 5 秒内被重定向到新的地址。</p>
<p>如果超过 5 秒后您仍然看到本消息,请点击上面的链接。</p>
<p> <>&"'</p>
</body>
</html>