html5 新增标签

简介

html5广义=html5+css3+javascript+api

特点:

  • 代码更加简洁
  • 增加了一些标签,标签具有语义化
  • 新增了一些属性
  • 代码更加宽松

当前html5处于推广阶段–各个浏览器存在兼容性,哪些浏览器支持html5

  • IE9版本以上支持html5
  • 其他浏览器都支持

html5结构

    <!doctype html><!--声明html5文档-->
    <html>
        <head>
            <meta charset="utf-8">
            <title>标题</title>
        </head>
        <body></body>
    </html>

新增标签

<header> 网页文档的一个区域–网页的头部
<nav 网页的导航–链接的哪行文本
<section> 网页中的一个块 –类似div
<article> 文章内容
<aside> 网站的侧标栏
<footer>网站页脚

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        body{
            font-size: 14px;
        }
        header{
            width: 998px;
            height: 100px;
            border: 1px solid gray;
            margin: 0px auto;
        }
        nav{
            width: 998px;
            height: 45px;
            border: 1px solid #333333;
            margin: 10px auto;
        }
        section{
            width: 998px;
            height: 1000px;
            border: 1px solid #666666;
            margin: 0px auto;
        }
        article{
            width: 600px;
            height: 800px;
            float: left;
            margin: 5px;
            border: 1px solid blue;
        }
        aside{
            width: 374px;
            height: 800px;
            float: right;
            margin: 5px; 
            border: 1px solid blue;

        }
        footer{
            width: 100%;
            height: 68px;
            background: #373737;
            margin-top: 10px;
        }
    </style>
</head>
<body> 
    <header></header>
    <nav></nav>
    <section>
        <article></article>
        <aside></aside>
    </section>
    <footer></footer>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值