通过你能够在项目中直接使用的众多实用配方,这本手册可以帮助你赢得HTML5的多个功能的实践经验。从标记语义、Web表单以及音频和视频元素到诸如地理定位和富JavaScript API之类的相关技术,你将应用各种知识来获取解决问题的明确方案。
《HTML5 Cookbook(影印版)》每个内容丰富的配方都包括示例代码和针对方案为何和如何生效的详细讨论。对于中等水平的人来说,这本手册是成长为高级Web和移动互联网开发者的最佳选择,它可以让你选择适合你的HTML5特性——并且帮助你熟悉其余的部分。
《HTML5 Cookbook(影印版)》内容包括:测试浏览器的HTML5支持度,并且使用特定技术来应用不支持的特性、了解HTML5如何使得Web表单的实现变得更加简单、克服实现本地音频和视频元素的挑战、学习在ARIA无障碍访问原则下使用HTML5的技术、探索各种示例,包括在你的应用中使用地理定位数据、利用绘制图像、使用透明特性、增加渐变色和模式等等、通过多个高级javascript API把HTML5特性带入现实生活中。
Happy Cog,交互开发部主管Christopher Schmitt是Heatvision.com公司的首席工程师。这是一家处理新媒体事件、设计和发布的公司。他从1993年就开始从事与Web相关的工作,同时也是《CSS Cookbook》(O'Reilly)的作者。
Kyle Simpson,是来自于德克萨斯州Austin公司的JavaScript系统架构师。他主要关注于JavaScript、Web性能优化和“中端”应用架构。Kyle还维护着若干个开源项目,包括LABjs。
Preface
1.FundamentaISyntaxand Semantics
1.1 Specifying the DOCTYPE
1.2 Specifying the Character Set
1.3 Specifying the Language
1.4 Optimizing s and s
1.5 Adding Document Structure with HTML5's New Elements
1.6 Choosing Between and
1.7 Checking Your Document Outline
1.8 Modifying the Document Outline
1.9 Emphasizing Text
1.10 Addinglmportance to Text
1.11 Highlighting Text for Reference
1.12 Marking Up Sma I IP rint
1.13 Defining Acronyms and Abbreviations
1.14 Adding Links to Block-Level Content
1.15 Marking Up Figures and Captions
1.16 Marking Up Dates and Times
1.17 Setting the Stage for Native Expanding and Collapsing
1.18 Controlling the Numbering of Your Lists
1.19 Hiding Content to Show Later
1.20 Making Portions of a Page Editable
1.21 Setting the Stage for Native Drag-and-Drop
2.Progressive Markup and Techniques
2.1 Adding More Seruantic Meaning
2.2 Picking a.Markup Style
2.3 Understanding Browser Support for HTML5
2.4 Making Internet Explorer Recognize HTML5 Elements
2.5 Detecting HTML5 Features with java Script
2.6 Using HTML5 Boilerplate
2.7 Validating HTML5
2.8 Mapping HTML5 Elements to ID and Class Names
3. Forms
3.1 Displaying a Search Input Field
3.2 Contact Information Input Fields
3.3 Utilizing Date and Time Input Fields
3.4 Numberlnputs
3.5 Selecting from a Range of Numbers
3.6 Selecting Colors
3.7 Creating an Editable Drop-Down
3.8 Requiring a Form Field
3.9 Auto focusing a Form Field
3.10 Displaying Placeholder Text
3.11 Disabling Auto complete
3.12 Restricting Values
3.13 Making HTML5 Work in Older Browsers
3.14 Validating Form Data in Older Browsers with java Script
3.15 Example: Sample Form
4.Native Audio
4.1 Adding HTML5 Audio
4.2 Manipulating the Audio Stream
4.3 Generating Using java Script
4.4 Visualizing Using
4.5 Sample Design: Custom Audio Player
5.Native Video
5.1 Adding HTML5 Video
5.2 Ensuring Multi-Browser Video Support
5.3 Setting Video Dimensions
5.4 Displaying a Placeholder Image Before Video Plays
5.5 Making Video Loop
5.6 Sample Design: Manipulating Video with
6.Mkrodata and Custom Data
6.1 Adding Micro data to Markup
6.2 Using Micro data and Schema.org
6.3 Adding Custom Data to Markup
6.4 Accessing Custom Data with java Script
6.5 Manipulating Custom Data
6.6 Example: Creating a Map Application Using Custom Data
……
7.Accessibility
8.Geolocation
9.
10.Advanced HTML5 JavaScript
Appendix: HTML5 Resources
Index
Discussion Browsers render the video player according to the dimensions you assign, not the resolution of your actual video. Using different dimensions might lead to a loss in quality by expanding a video beyond its native resolution; the same goes for scaling down a large video simply to fit into a small space.
So, when possible, use the same dimension values for the video element as for the vide of ile itself, and don't resize your video with width and height. Technically speaking, the width and height of a video element do not need to be set as browsers default to inheriting the dimensions of the video file itself. The drawback to this approach is that if the dimensions are not set, browsers won't know what space to reserve for your video and may have to redraw your page after downloading the videodata, The width and height values need to be set in CSS pixels as integers and not aspercentages or other values. Adding dimension values helps browsers more efficiendyrender your pages, which usually results in a better user experience. Since you probably don't want to use width and height to resize your video to something other than its native dimensions, you can instead use encoding software to specify ther esolution.
……