Hi All,

分享一下我学HTML5 摘抄的读书笔记(我用的还是英文,因为一些新的东西还是来自于欧美国家,希望大家习惯于看一些英文材料):

1. Difference between Sections and Articles?

  Think of a section as a logical part of a document. Think of an article as actual content, such as a magazine article, blog post, or news item.

These new tags describe the content they contain. Sections can have many articles, and articles can also have many sections.

A section is like the sports section of a newspaper. The sports section has many articles. Each of those articles may again be divided into its own bunch of sections.     Some sections like headers and footer s have proper tags. A section is a more generic element you can use to logically group other elements. Semantic markup is all about conveying the meaning of your content.

2. New Elements

  <header> - Defines a header region of a page or section. [C5, F3.6, IE8, S4,O10]

  <footer> - Defines a footer region of a page or section. [C5, F3.6, IE8, S4, O10]

  <nav> - Defines a navigation region of a page or section. [C5, F3.6, IE8, S4, O10]

  <section> - Defines a logical region of a page or a grouping of content. [C5, F3.6, IE8, S4, O10]

  <article> - Defines an article or complete piece of content. [C5, F3.6, IE8, S4, O10]

  <aside> - Defines secondary or related content. [C5, F3.6, IE8, S4, O10]

  Custom data attributes

  Allows addition of custom attributes to any elements using the data- pattern. [All browsers support reading these via JavaScript’s getAttribute() method.]

  <meter> - Describes an amount within a range. [C5, F3.5, S4, O10]

  <progress> - Control that shows real-time progress toward a goal. [Unsupported at publication time.]

  <canvas> - The canvas element is a container element much like the script element. It’s a blank slate we can draw on.

  <audio> [<audio src="drums.mp3"></audio>] - Play audio natively in the browser. [C4, F3.6, IE9, S3.2, O10.1, IOS3, A2]

  <video> [<video src="tutorial.m4v"></video>] - Play video natively in the browser. [C4, F3.6, IE9, S3.2, O10.5, IOS3, A2]

3. New Tags

  1) URL field [<input type="url">] - Displays a form field for URLs. [O10.1, IOS]

  2) Telephone field [<input type="tel">] - Displays a form field for telephone numbers. [O10.1, IOS]

  3) Search field [<input type="search"> - Displays a form field for search keywords. [C5, S4, O10.1, IOS]

  4) Slider (range) [<input type="range">] - Displays a slider control. [C5, S4, O10.1]

  5) Number [<input type="number">] - Displays a form field for numbers, often as a spinbox. [C5, S5, O10.1, IOS]

  6) Date fields [<input type="date">] - Displays a form field for dates. Supports date, month, or week. [C5, S5, O10.1]

  7) Dates with Times [<input type="datetime">] - Displays a form field for dates with times. Supports datetime,

  8) datetime-local, or time. [C5, S5, O10.1]

  9) Color [<input type="color">] - Displays a field for specifying colors. [C5, S5] (Chrome 5 and Safari5 understand the Color field but do not display any specific

4. CSS3 - new Styles & selector

  1) :nth-of-type [p:nth-of-type(2n+1){color: red;}]

  Finds all n elements of a certain type. [C2, F3.5, S3, IE9, O9.5, IOS3, A2]

 :first-child [p:first-child{color:blue;}]

  Finds the first child element. [C2, F3.5, S3, IE9, O9.5, IOS3, A2]

  3) :nth-child [p:nth-child(2n+1){color: red;}]

  Finds a specific child element counting forward. [C2, F3.5, S3, IE9, O9.5, IOS3, A2]

  4) :last-child [p:last-child{color:blue;}]

  Finds the last child element. [C2, F3.5, S3, IE9, O9.5, IOS3, A2]

  5) :nth-last-child [p:nth-last-child(2){color: red;}]

  Finds a specific child element counting backward. [C2, F3.5, S3, IE9, O9.5, IOS3, A2]

  6) :first-of-type [p:first-of-type{color:blue;}]

  Finds the first element of the given type. [C2, F3.5, S3, IE9, O9.5, IOS3, A2]

  7) :last-of-type [p:last-of-type{color:blue;}]

  Finds the last element of the given type. [C2, F3.5, S3, IE9, O9.5, IOS3, A2]

  8) Column support [#content{ column-count: 2; column-gap: 20px; column-rule: 1px solid #ddccb5; }]

  Divides a content area into multiple columns. [C2, F3.5, S3, O9.5, IOS3, A2]

  9) :after [span.weight:after { content: "lbs"; color: #bbb; }]

  Used with content to insert content after the specified element. [C2, F3.5, S3, IE8, O9.5, IOS3, A2]

  10) Media Queries [media="only all and (max-width: 480)"]

  Apply styles based on device settings. [C3, F3.5, S4, IE9, O10.1, IOS3, A2]

  11) border-radius [border-radius: 10px;]

  Rounds corners of elements. [C4, F3, IE9, S3.2, O10.5]

  12) RGBa Supprt [background-color: rgba(255,0,0,0.5);]

  Uses RGB color instead of hex codes along with transparency. [C4, F3.5, IE9, S3.2, O10.1]

  13) box-shadow [box-shadow: 10px 10px 5px #333;]

  14) Rotation: [transform: rotate(7.5deg);]

  Rotates any element. [C3, F3.5, IE9, S3.2, O10.5]

  15) Gradients: [linear-gradient(top, #fff, #efefef);]

  Creates gradients for use as images. [C4, F3.5, S4]

  16) @font-face [@font-face { font-famil y: Awes omeF ont; ]

  src: url(http://example.com/awesomeco.ttf); font-wei ght: bold; }] - Allows use of specific fonts via CSS. [C4, F3.5, IE5+, S3.2, O10.1]

  17) Creates drop shadows on elements. [C3, F3.5, IE9, S3.2, O10.5]

5. New Attributes

  1) The role attribute [<div role="document">]

  Identifies responsibility of an element to screen readers. [C3, F3.6, S4, IE8, O9.6]

  Role                          Use

  banner                            Identifies the banner area of your page

  search                             Identifies the search area of your page

  navigation                       Identifies navigational elements on your page

  main                               Identifies where your page’s main content begins

  contentinfo                      Identifies where information about the content exists, such as copyright information and publication date

  complementary                Identifies content on a page that complements the

  main                               content but is meaningful on its own

  application                       Identifies a region of a page that contains a web application as opposed to a web document

  document                        Identifies a region containing document content, as opposed to application content.

  article                             Identifies a composition that forms an independent part of a document.

  definition                        Identifies a definition of a term or subject.

  directory                         Identifies a list of references to a group, like a table of contents. Used for static content.

  heading                          Identifies a heading for a section of a page.

  img                                Identifies a section that contains elements of an image. This may be image elements as well as captions and descriptive text.

  list                                 Identifies a group of noninteractive list items.

  listitem                           Identifies a single member of a group of noninteractive list items.

  math                              Identifies a mathematical expression.

  note                               Identifies content that is parenthetic or ancillary to the main content of the resource.

  presentation                   Identifies content that is for presentation and can be ignored by assistive technology.

  row                               Identifies a row of cells in a grid.

  rowheader                     Identifies a cell containing header information for a row in a grid.

  2) aria-live [<div aria-live="polite">]

  Identifies a region that updates automatically, possibly by Ajax. [F3.6 (Windows), S4, IE8]

  3) aria-atomic [<div aria-live="polite" aria-atomic="true">]

  Identifies whether the entire content of a live region should be read or just the elements that changed. [F3.6 (Windows), S4, IE8]

6. Format and Supported Browsers

  Embedded OpenType (EOT) [IE5–8]

  TrueType (TTF) [IE9, F3.5, C4, S4]

  OpenType (OTF) [IE9, F3.5, C4, S4, O10.5]

  Scalable Vect or Graphics (SVG) [IOS]

  We b Open Font (WOFF) [IE9, F3.6]

7. Client storage

  localStorage

  Stores data in key/value pairs, tied to a domain, and persists across browser sessions. [C5, F3.5, S4, IE8, O10.5, IOS, A]

  sessionStorage

  Stores data in key/value pairs, tied to a domain, and is erased when a browser session ends. [C5, F3.5, S4, IE8, O10.5, IOS, A]

  We b SQL Databases

  Fully relational databases with support for creating tables, inserts, updates, deletes, and selects, with transactions. Tied to a domain and persists across sessions.         [C5, S3.2, O10.5, IOS3.2, A2]

  Offline We b Applications

  Defines files to be cached for offline use, allowing applications to run without an Internet connection. [C4, S4, F3.5, O10.6, IOS3.2, A2]

本笔记内容摘抄于HTML5 and CSS3.pdf电子书,下载连接 http://it-ebooks.info/book/29/

HTML5&CSS3读书笔记的更多相关文章

  1. HTML5&CSS3练习笔记(二)

    HTML5&CSS3  练习CSS3伪选择器使用 1.first-line  格式:元素:first-line 说明:设置同一个标签下所有行内容的第一行的样式,例如: <table st ...

  2. HTML5+CSS3学习笔记(二) 页面布局:HTML5新元素及其特性

    HTML5的语义化标签以及属性,可以让开发者非常方便地实现清晰的web页面布局,加上CSS3的效果渲染,快速建立丰富灵活的web页面显得非常简单. 本次学习HTML5的新标签元素有: <head ...

  3. HTML5+CSS3学习笔记(一)

    HTML5+CSS3概述 HTML5和CSS3不仅仅是两项新的Web技术标准,更代表了下一代HTML和CSS技术.虽然HTML5的标准规范还没有正式发布,但是未来的发展前景已经可以预见,那就是HTML ...

  4. HTML5+CSS3学习笔记(一) 概述

    HTML5+CSS3概述      HTML5和CSS3不仅仅是两项新的Web技术标准,更代表了下一代HTML和CSS技术.虽然HTML5的标准规范还没有正式发布,但是未来的发展前景已经可以预见,那就 ...

  5. Head First HTML5 Programming 读书笔记

    1:HTML5引入了简单化的标记,新的语义和媒体元素,另外要依赖于一组支持web应用的js库. 2:关于js 对象是属性的结合 window对象是全局变量. document对象是window的一个属 ...

  6. html5+css3学习笔记-prefixfree前缀补全插件

    虽然现代浏览器支持CSS3,但是一些过往的版本或是目前有些CSS3属性的应用还是离不开前缀的.一些牛逼且执着于web技术且乐于分享的仁兄(Lea Verou)就搞了个名叫prefixfree.js的插 ...

  7. HTML5/CSS3/JS笔记

    HTML笔记: 前言: HTML无非就是围绕标签.属性.属性值这三个词展开的. (标签也可以叫做元素, 元素的内容是开始标签与结束标签之间的内容) *常规标签 <标签 属性1="属性值 ...

  8. HTML5&CSS3练习笔记(一)

    属性选择器的用法 格式:[属性/^/*/$=值] 1.[attr=val] 匹配指定值的元素 <div> <div id="section1"> 完全匹配元 ...

  9. HTML5秘籍读书笔记

    1:基本雏形 <html><head> <meta charset="UTF-8"> <title></title>&l ...

随机推荐

  1. 设计模式(一)—单例模式

    一.概述 1.单例模式的优点      由于单例模式只生成一个实例,减少了系统性能的开销,当一个对象的产生需要比较多的资源时,如读取配置,产生其他依赖对象时,则可以通过在应用启动时直接产生一个单例对象 ...

  2. java 基础知识十 继承和多态

    java  基础知识十   继承和多态 继承 1.定义: 继承是指声明一些类,可以再进一步声明这些类的子类,而子类具有父类已经拥有的一些方法和属性,这跟现实中的父子关系是十分相似的,所以面向对象把这种 ...

  3. 前端开发必须说的那些事之——同源策略(same origin policy)

    同源策略指的是三个相同 协议相同 域名相同 端口相同 如https://www.baidu.com/hahah.html这个网址来说 https是使用的协议,www.baidu.com是域名,端口号默 ...

  4. ECSHOP自动收货解决方案 【附代码】

    ecshop系统,本身不带自动确认收货的,网上也找了一下,很多很复杂,且需要在服务器端设置定时任务,如果是虚拟主机,基本上就歇菜了. 某宝有一些卖自动收货的插件,不太了解其机制,不过也比较贵,要1-2 ...

  5. kNN算法个人理解

    新手,有问题的地方请大家指教 训练集的数据有属性和标签 同类即同标签的数据在属性值方面一定具有某种相似的地方,用距离来描述这种相似的程度 k=1或则较小值的话,分类对于特殊数据或者是噪点就会异常敏感, ...

  6. JS实现图片不间断滚动

    方法一: <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title ...

  7. SQLite中使用CTE巧解多级分类的级联查询

    在最近的项目中使用ActiveReports报表设计器设计一个报表模板时,遇到一个多级分类的难题:需要将某个部门所有销售及下属部门的销售金额汇总,因为下属级别的层次不确定,所以靠拼接子查询的方式显然是 ...

  8. 【知识必备】浅淡MVP在Android项目中的实战演习,让代码结构更简单~

    一.写在前面 讲道理,这次是真的笔者很久都没有更新blog了,主要最近维护的框架问题也是层出不穷,而且对技术交流群的解答也让我身心疲惫,所以在这里跟关注我的人说声抱歉,没有定期给你们带来福利,那么这里 ...

  9. hdu1512 Monkey King

    Problem Description Once in a forest, there lived N aggressive monkeys. At the beginning, they each ...

  10. JAVA 继承中的this和super

    学习java时看了不少尚学堂马士兵的视频,还是挺喜欢马士兵的讲课步骤的,二话不说,先做实例,看到的结果才是最实际的,理论神马的全是浮云.只有在实际操作过程中体会理论,在实际操作过程中升华理论才是最关键 ...