zoukankan      html  css  js  c++  java
  • HTML5 --- 新增标签

    做网站讲究友好关系;

    1.html5语义化标签

    <header></header> --- 网页文档的头部;

    <nav></nav> --- 网页的导航栏;

    <section></section> --- 网页的块,相当于<div>;

    <aside></aside> --- 网页的侧边栏;

    <footer<</footer> --- 网页的页脚,放置网页的版权信息;

    <article></article> --- 网页的文章内容;

    html5标签结构

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>
         body{background: gray;} header{ width: 500px;height: 80px;background: red;margin: 0 auto;} nav{width: 500px;height: 20px;background: green;margin: 5px auto;} section{width: 500px;height: 300px;background: blue;margin: 5px auto;} article{width: 290px;height: 290px;background: gray;margin:5px;float: left;} aside{width:190px ;height: 290px;background: yellow;margin: 5px;float: left;} footer{width: 500px;height: 40px;background: red;margin: 0 auto;} </style> </head> <body> <header></header> <nav></nav> <section> <article></article> <aside></aside> </section> <footer></footer> </body> </html>

    2.视频标签

    可支持的视频格式有:.ogg   .mp4   .webm

    ①仅支持mp4或ogg或webm中的一种格式,例

    <video src="./images/xxxx.mp4/ogg/webm" autoplay="autoplay" controls=""></video>

    ②可同时支持三种格式,例;

    <video autoplay="autoplay" controls>
       <source src="./images/xxxx.mp4">
       <source src="./images/xxxx.ogg">
       <source src="./images/xxxx.webm">
    </video>

    3.音频标签

    可支持的视频格式有:.ogg   .mp3   .wav

    ①仅支持mp3或ogg或wav中的一种格式,例

    <audio src="./images/xxxx.mp3/ogg/wav" autoplay="autoplay" controls></audio>

    ②可同时支持三种格式,例;

    <audio autoplay="autoplay" controls>
        <source src="./images/xxxx.mp3">
        <source src="./images/xxxx.ogg">
        <source src="./images/xxxx.wav">
    </audio>
  • 相关阅读:
    android中statusbar高度的问题
    int和short做循环计数器时的效率问题
    解决Rectangle Packing问题【原创】
    10个android开源项目(转)
    自动编译.9.png文件
    通过wifi调试android程序
    HBase 性能优化笔记
    [转载]定制CentOS 6.3 自动安装盘
    region split时metascan出现regioninfo为空
    Google Dremel 原理 如何能3秒分析1PB
  • 原文地址:https://www.cnblogs.com/wells33373/p/8191729.html
Copyright © 2011-2022 走看看