4.3 宽容的 HTML5
<link href=CSS/main.css rel=stylesheet >
这一行没有 type 标签,结尾也没有斜杠,但是他是完全合法的。
4.3.2 向<a>标签致敬
<a href="index.html">
<h2>The home page</h2>
<p>This paragraph also links to the home page</p>
<img src="home-image.png" alt="home-slice" />
</a>
a 标签内将可以嵌套东西。
4.4 HTML5 的新语义元素
<header> 网站头部
<footer> 网站尾部
<main> 放置主要元素
<section> 放置主要元素
<nav> 放置导航元素
<section> 放置通用区块
<aside> 广告和导航元素等,于电子商务站点来说,我会把“购买了这个商品的用户还购
买了”的内容放在<aside>里面。
<detail> 和 <summary> 一个带有收起展开的标签
<details>
<summary>I ate 15 scones in one day</summary>
<p>Of course I didn't. It would probably kill me if I did. What away to go. Mmmmmm, scones!</p>
</details>
4.9 在 HTML5 中嵌入媒体
<video src="myVideo.mp4" width="640" height="480" controls autoplay> What, do you mean you don't understand HTML5?</video>
video { max-width: 100%; height: auto; }
规定了宽高,controls autoplay 是使用默认播放器播放
可以为它设置css属性,让他有自适应效果。