HTML5 学习笔记

我们平时说的h5 指的是前端开发技术,响应时
HTML 发展史:
 
    HTM2.0        --1993.6(IETF)
    HTM3.2        --1995.11(RFC)
    HTM4.0        --1997.1.14(W3C)
    HTM4.0.1     --1999.12.24(W3C)
    HTML5        --2014.10.28(W3C)
 
特性:
  表单控件,例如calendar/date/time/email/url/search/
    特殊的内容元素,
    。。。。
 
    标签: header ,nav,div,footer,aside等
 
    多媒体:mpeg4(shipin/音频,H.264/ACC)(苹果,微软/有版权的)  、ogg(Theora/Vorbis)--firefox、 webM(VP8/Vorbis)--google
 
    本地存储--localStorage
                  --sessionStorage    与localStorage作用域不同。
                   与cookie相比,存储量更大。默认分配5M大小
                   用法:sessionStorage.lastname="smith"
 
    画布 --canvas标签
    server Push  EventSource   拉取机制(3s)
                         Websocket 建立实时的常连接
  
选择器:
    :nth-child(n)--第几个子元素  n--可以是数字(数字从1开始),可以为奇偶(old/even)
    :nth-last-child(n)
    :last-child
    :empty
    :not(s)
效果:圆角,阴影,倾斜,动画的css支持。
 
文字处理:
text-transform:capitalize
text-transform:uppercase
text-transform:lowercase
text-overflow:ellipsis
布局等。
 
设备选择,根据显示器尺寸自动获取对应的处理css等内容。
 
语义化,内容展现分离!
无障碍访问。
 
开发规范
--所有元素小写,所用引号用双引号
--不建议写闭合元素 
<!DOCTYPE html> --html5 只支持一种--html
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>PAGE TITLE</title>
        <link rel="stylesheet"  **********css> 
        <script **********js>  --不支持type    --src写绝对应用的时候应该不写头 ,例如src = "//www.xxx.com/xxx.js"
    </head>
    <body>
        ******************
    <img src="xxx.jpg" alt="****"> --注释  alt 是html4写法  html5 用title
    <input  ***** disable>  --html5 推荐这种写法  不推荐disable = “disable”
    </body>
</html>
 
 
具体应用场景
 
     布局元素  : 早期--table  --》 div --》div细分(例如:header等)
        --各种元素都有自己适用的场景。
 
    <lable for="xxx">--lable标签的使用
 
其他 
 
工具
--modernizr 工具 --js代码  检测浏览器支持哪些特性  如果不支持会加上class用来弥补不支持的特性
 
--iTag  include页面
 
 
 
 
 
 
 
 
 
 
 
 
 
原文地址:https://www.cnblogs.com/wuyuxiang/p/5166755.html