div是html5新元素,html5的新元素

昨天听了上海网务肖飞老师的一节课,主要讲关于html5的新元素,现将自己所学拿出来分享一下。

自打2000年以来,超文本标记语言第一次添加了新元素,包括新的结构元素包括 aside、figure 和 section。新的内联元素包括 time、meter 和 progress。新的内嵌元素有 video 和 audio。新的交互元素有 details、datagrid 和 command。

今天首先讲一下结构元素:

由于缺少结构,即使是形式良好的 HTML 页面也比较难以处理。必须分析标题的级别,才能看出各个部分的划分方式。边栏、页脚、页眉、导航条、主内容区和各篇文章都由通用的 div 元素来表示。HTML 5 添加了一些新元素,专门用来标识这些常见的结构:

section:这可以是书中的一章或一节,实际上可以是在 HTML 4 中有自己的标题的任何东西

header:页面上显示的页眉;与 head 元素不一样

footer:页脚;可以显示电子邮件中的签名

nav:指向其他页面的一组链接

article:blog、杂志、文章汇编等中的一篇文章

我们来考虑一个典型的 blog 主页,它的顶部有页眉,底部有页脚,还有几篇文章、一个导航区和一个边栏,见清单 1。

Mokka mit Schlag

Yesterday I joined the Brooklyn Bird Club for our

annual trip to Western New Jersey, specifically Hyper

Humus, a relatively recently discovered hot spot. It

started out as a nice winter morning when we arrived

at the site at 7:30 A.M., progressed to Spring around

10:00 A.M., and reached early summer by 10:15.

Seems you can now go href="

2007/04/cone_sf">bird watching via the Internet. I

haven't been able to test it out yet (20 user

limit apparently) but this is certainly cool.

Personally, I can't imagine it replacing

actually being out in the field by any small amount.

On the other hand, I've always found it quite

sad to meet senior birders who are no longer able to

hold binoculars steady or get to the park. I can

imagine this might be of some interest to them. At

least one elderly birder did a big year on TV, after

he could no longer get out so much. This certainly

tops that.

Copyright 2007 Elliotte Rusty Harold

下面看一下用html5编写的页面

Mokka mit Schlag

Yesterday I joined the Brooklyn Bird Club for our

annual trip to Western New Jersey, specifically Hyper

Humus, a relatively recently discovered hot spot. It

started out as a nice winter morning when we arrived at

the site at 7:30 A.M., progressed to Spring around 10:00

A.M., and reached early summer by 10:15.

Seems you can now go href="

2007/04/cone_sf">bird watching via the Internet. I

haven't been able to test it out yet (20 user

limit apparently) but this is certainly cool.

Personally, I can't imagine it replacing

actually being out in the field by any small amount.

On the other hand, I've always found it quite

sad to meet senior birders who are no longer able to

hold binoculars steady or get to the park. I can

imagine this might be of some interest to them. At

least one elderly birder did a big year on TV, after

he could no longer get out so much. This certainly

tops that.

Copyright 2007 Elliotte Rusty Harold

很简单的东西,不需要div,也没有必要自己去设置class属性,我们完全可以从元素名推出元素的意义。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值