Html5

 

Embed or link this publication

Popular Pages


p. 1

download from library of wow ebook

[close]

p. 2

download from library of wow ebook

[close]

p. 3

html5 up and running download from library of wow ebook

[close]

p. 4

download from library of wow ebook

[close]

p. 5

html5 up and running mark pilgrim beijing · cambridge · farnham · köln · sebastopol · taipei · tokyo download from library of wow ebook

[close]

p. 6

html5 up and running by mark pilgrim copyright © 2010 mark pilgrim all rights reserved printed in the united states of america published by o reilly media inc 1005 gravenstein highway north sebastopol ca 95472 o reilly books may be purchased for educational business or sales promotional use online editions are also available for most titles http my.safaribooksonline.com for more information contact our corporate/institutional sales department 800 998-9938 or corporate@oreilly.com editor mike loukides production editor adam zaremba copyeditor rachel head proofreader emily quill printing history august 2010 first edition indexer fred brown cover designer karen montgomery interior designer david futato illustrator robert romano nutshell handbook the nutshell handbook logo and the o reilly logo are registered trademarks of o reilly media inc html5 up and running the image of an alpine chamois and related trade dress are trademarks of o reilly media inc many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks where those designations appear in this book and o reilly media inc was aware of a trademark claim the designations have been printed in caps or initial caps while every precaution has been taken in the preparation of this book the publisher and author assume no responsibility for errors or omissions or for damages resulting from the use of the information contained herein tm this book uses repkovertm a durable and flexible lay-flat binding isbn 978-0-596-80602-6 [m 1281030545 download from library of wow ebook

[close]

p. 7

table of contents preface ix 1 how did we get here 1 diving in mime types a long digression into how standards are made an unbroken line a timeline of html development from 1997 to 2004 everything you know about xhtml is wrong a competing vision what working group back to the w3c postscript further reading 1 1 2 7 9 10 11 12 13 14 14 2 detecting html5 features 15 diving in detection techniques modernizr an html5 detection library canvas canvas text video video formats local storage web workers offline web applications geolocation input types placeholder text form autofocus microdata 15 15 16 16 17 18 19 21 23 23 24 25 27 27 28 v download from library of wow ebook

[close]

p. 8

further reading 29 3 what does it all mean 31 diving in the doctype the root element the

[close]

p. 9

encoding ogg video with firefogg batch encoding ogg video with ffmpeg2theora encoding h.264 video with handbrake batch encoding h.264 video with handbrake encoding webm video with ffmpeg at last the markup mime types rear their ugly head what about ie a complete example further reading 91 98 100 107 108 110 113 114 114 115 6 you are here and so is everybody else 117 diving in the geolocation api show me the code handling errors choices i demand choices what about ie geo.js to the rescue a complete example further reading 117 117 118 120 121 123 123 125 126 7 the past present and future of local storage for web applications 127 diving in a brief history of local storage hacks before html5 introducing html5 storage using html5 storage tracking changes to the html5 storage area limitations in current browsers html5 storage in action beyond named key/value pairs competing visions further reading 127 128 129 130 131 132 132 134 135 8 let s take this offline 137 diving in the cache manifest network sections fallback sections the flow of events the fine art of debugging a.k.a kill me kill me now let s build one further reading 137 138 139 140 141 142 145 146 table of contents vii download from library of wow ebook

[close]

p. 10

9 a form of madness 147 diving in placeholder text autofocus fields email addresses web addresses numbers as spinboxes numbers as sliders date pickers search boxes color pickers and one more thing further reading 147 147 148 150 151 153 155 156 158 160 160 161 10 distributed extensibility and other fancy words 163 diving in what is microdata the microdata data model marking up people introducing google rich snippets marking up organizations marking up events the return of google rich snippets marking up reviews further reading 163 164 165 168 174 176 180 184 185 189 appendix the all-in-one almost-alphabetical guide to detecting everything 191 index 201 viii table of contents download from library of wow ebook

[close]

p. 11

preface diving in what is html5 html5 is the next generation of html superseding html 4.01 xhtml 1.0 and xhtml 1.1 html5 provides new features that are necessary for modern web applications it also standardizes many features of the web platform that web developers have been using for years but that have never been vetted or documented by a standards committee would it surprise you to learn that the window object has never been formally documented in addition to the new features html5 is the first attempt to formally document many of the de facto standards that web browsers have supported for years like its predecessors html5 is designed to be cross-platform you don t need to be running windows or mac os x or linux or multics or any particular operating system in order to take advantage of html5 the only thing you do need is a modern web browser there are modern web browsers available for free for all major operating systems you may already have a web browser that supports certain html5 features the latest versions of apple safari google chrome mozilla firefox and opera all support many html5 features you ll find more detailed browser compatibility tables throughout this book the mobile web browsers that come preinstalled on iphones ipads and android phones all have excellent support for html5 even microsoft has announced that the upcoming version 9 of internet explorer will support some html5 functionality this book will focus on eight topics · new semantic elements like


[close]

p. 12

· offline web applications that work even after network access is interrupted chapter 8 · improvements to html web forms chapter 9 · microdata that lets you create your own vocabularies beyond html5 and extend your web pages with custom semantics chapter 10 html5 is designed as much as possible to be backward compatible with existing web browsers new features build on existing features and allow you to provide fallback content for older browsers if you need even greater control you can detect support for individual html5 features chapter 2 using a few lines of javascript don t rely on fragile browser sniffing to decide which browsers support html5 instead test for the features you need using html5 itself conventions used in this book the following typographical conventions are used in this book italic indicates new terms urls email addresses filenames and file extensions constant width used for program listings as well as within paragraphs to refer to program elements such as variable or function names databases data types environment variables statements and keywords constant width bold shows commands or other text that should be typed literally by the user constant width italic shows text that should be replaced with user-supplied values or by values determined by context this icon signifies a tip suggestion or general note this icon indicates a warning or caution x preface download from library of wow ebook

[close]

p. 13

using code examples this book is here to help you get your job done in general you may use the code in this book in your programs and documentation you do not need to contact us for permission unless you re reproducing a significant portion of the code for example writing a program that uses several chunks of code from this book does not require permission selling or distributing a cd-rom of examples from o reilly books does require permission answering a question by citing this book and quoting example code does not require permission incorporating a significant amount of example code from this book into your product s documentation does require permission we appreciate but do not require attribution an attribution usually includes the title author publisher and isbn for example html5 up and running by mark pilgrim copyright 2010 o reilly media inc 978-0-596-80602-6 if you feel your use of code examples falls outside fair use or the permission given above feel free to contact us at permissions@oreilly.com a note on the editions of this book this book is derived from its html5 source found at http diveintohtml5.org and maintained by the author the ebook and safari books online editions include all the original hyperlinking while the print edition includes only a subset of the hyperlinks set as urls in parentheses if you are reading the print edition please refer to one of the other editions or the original source for a richer linking experience because the author maintains http diveintohtml5.org in html5 the site includes live examples of the code described in this book many of which had to be modified for publication please visit http diveintohtml5.org to see these examples but be aware that their rendering may vary across browsers safari® books online safari books online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly with a subscription you can read any page and watch any video from our library online read books on your cell phone and mobile devices access new titles before they are available for print and get exclusive access to manuscripts in development and post feedback for the authors copy and paste code samples organize your favorites download chapters bookmark key sections create notes print out pages and benefit from tons of other time-saving features download from library of wow ebook

[close]

p. 14

o reilly media has uploaded this book to the safari books online service to have full digital access to this book and others on similar topics from o reilly and other publishers sign up for free at http my.safaribooksonline.com how to contact us please address comments and questions concerning this book to the publisher o reilly media inc 1005 gravenstein highway north sebastopol ca 95472 800-998-9938 in the united states or canada 707-829-0515 international or local 707-829-0104 fax we have a web page for this book where we list errata examples and any additional information you can access this page at http oreilly.com/catalog/9780596806026 to comment or ask technical questions about this book send email to bookquestions@oreilly.com for more information about our books conferences resource centers and the o reilly network see our website at http www.oreilly.com xii preface download from library of wow ebook

[close]

p. 15

chapter 1 how did we get here diving in recently i stumbled across a quote from a mozilla developer about the tension inherent in creating standards implementations and specifications have to do a delicate dance together you don t want implementations to happen before the specification is finished because people start depending on the details of implementations and that constrains the specification however you also don t want the specification to be finished before there are implementations and author experience with those implementations because you need the feedback there is unavoidable tension here but we just have to muddle on through keep this quote in the back of your mind and let me explain how html5 came to be mime types this book is about html5 not previous versions of html and not any version of xhtml but to understand the history of html5 and the motivations behind it you need to understand a few technical details first specifically mime types every time your web browser requests a page the web server sends a number of headers before it sends the actual page markup these headers are normally invisible although there are a number of web development tools that will make them visible if you re interested the headers are important because they tell your browser how to interpret the page markup that follows the most important header is called content-type and it looks like this content-type text/html text/html is called the content type or mime type of the page this header is the only thing that determines what a particular resource truly is and therefore how it should be rendered images have their own mime types image/jpeg for jpeg images image/png for png images and so on javascript files have their own mime type css 1 download from library of wow ebook

[close]

Comments

no comments yet

YOUBLISHER
About
What Others Say
Sitemap
Impressum

PUBLISHERS
Login
Signup
Tutorials
FAQ
Support

BUSINESS
Overview
Advertising
Support

DEVELOPERS
API

LEGAL
Report a Copyright Violation
Copyright FAQ
Terms of Use
Privacy Policy