php lt div gt,HTML5的<footer>标签元素怎么使用

H5里面增加了一个 footer 标签元素,那么我们要怎样使用呢?记得我们在html5版本以前布局网页底部版权时,都会习惯使用id=”footer”或 >

HTML5 footer 标签元素 新增html5底部footer元素标签,对html 5新增footer标签基础认识到了解footer css布局教程做到真正掌握与认识 footer

记得我们在以前html5版本以前布局网页底部版权时,习惯使用id=”footer”或 >

比如传统html布局代码:div id=”footer”

学习PHP,上www.php.cn!

/div

但在html5中将此”footer”常用的命名新增为html5元素标签成员。

html5语法结构

1、语法footer

学习PHP,上www.php.cn!

/footer

2、对footer元素标签加idfooter id=”abc”

学习PHP,上www.php.cn!

/footer

3、对footer标签加classfooter >

4、知识扩展

我们在html5开发使用footer标签时,把当作普通div标签对待即可,只不过一般用于网站底部布局。一般情况下一篇网页只有一个底部区,所以使用最好只使用一次footer即可。

需要注意: footer 是html5新增的,在IE8及以下IE浏览器不兼容,谨慎使用。

tml5 footer使用布局案例

通过传统div标签布局与footer标签布局对比观察学习,从而掌握footer标签。同时对footer加class,设置红色字体进行对比。

1、完整HTML5布局实例代码!DOCTYPE html html head meta charset= utf-8 / title footer /title style body{text-align:center} #footer{color:#CCC; background:#630202;border-top:1px solid #871515; padding:10px 0 30px 0; width:100%} footer{ background:#CCC;border-top:1px solid #000; padding:10px 0 30px 0; width:100%} .color-F00{ color:#F00} /style /head body p 传统html 使用div布局 /p div id= footer 学习PHP,上www.php.cn! /div p html5 footer标签布局 /p footer 学习PHP,上www.php.cn! /footer p html5 footer标签布局设置class /p footer >

以上使用传统html div标签和html5 footer标签布局,同时也对footer设置class

footer 标签的用法就是这么多了,更多精彩请关注php 其它相关文章!

相关推荐

html 的 header 标签需要怎么使用

html文档类型声明怎么写

css3里怎么显示圆形图片

以上就是HTML5的 footer 标签元素怎么使用 的详细内容,html教程

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值