Hello! HTML5 And CSS3 Hello A User Friendly Reference Guide R. Crowther (Manning, 2013) WW

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 561

DownloadHello! HTML5 And CSS3 Hello - A User Friendly Reference Guide R. Crowther (Manning, 2013) WW
Open PDF In BrowserView PDF
A user-friendly reference guide

HTM L5
& CSS3
Rob Crowther

M AN N I N G

Hello! HTML5 & CSS3

Hello! HTML5 & CSS3
A user-friendly reference guide

Rob Crowther

MANNING
SHELTER ISLAND

For online information and ordering of this and other Manning books, please visit
www.manning.com. The publisher offers discounts on this book when ordered in
quantity. For more information, please contact:
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 261
Shelter Island, NY 11964
Email: orders@manning.com
©2013 by Manning Publications Co. All rights reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted,
in any form or by means electronic, mechanical, photocopying, or otherwise, without
prior written permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products
are claimed as trademarks. Where those designations appear in the book, and Manning
Publications was aware of a trademark claim, the designations have been printed in initial
caps or all caps.
User Friendly artwork, characters, and strips used by permission from UserFriendly.Org.
All Rights Reserved.
Recognizing the importance of preserving what has been written, it is Manning’s policy to
have the books we publish printed on acid-free paper, and we exert our best efforts to that
end. Recognizing also our responsibility to conserve the resources of our planet, Manning
books are printed on paper that is at least 15 percent recycled and processed without
elemental chlorine.

Manning Publications Co.
20 Baldwin Road
PO Box 261
Shelter Island, NY 11964

Development editor:
Copyeditor:
Technical proofreader:
Typesetter:
Cover designer:

ISBN: 9781935182894
Printed in the United States of America
1 2 3 4 5 6 7 8 9 10 – MAL – 17 16 15 14 13 12

Cynthia Kane
Tiffany Taylor
Adam London
Marija Tudor
Marija Tudor

brief contents
PART 1 LEARNING HTML5 1
1
2
3
4
5
6

Introducing HTML5 markup 3
HTML5 forms 38
Dynamic graphics 73
Audio and video 119
Browser-based APIs 153
Network and location APIs 191

PART 2 LEARNING CSS3
7
8
9
10
11

231

New CSS language features 233
Layout with CSS3 271
Motion and color 313
Borders and backgrounds with CSS3
Text and fonts 392

v

351

contents
preface xv
acknowledgments xvii
about this book xix

PART 1 LEARNING HTML5 1
1 Introducing HTML5 markup

3

Why do we need new elements? 4
New elements for page structure 7
Sectioning content 7 ❍ Headings, headers, and the outlining
algorithm 9 ❍ Common page elements 15

The HTML DOCTYPE 17
New elements for content 18
Time 18 ❍ Images and diagrams with 
and
21 ❍ Emphasizing words and phrases 22 HTML5’s new global attributes 23 Accessibility with ARIA 24 ❍ Extending HTML with custom attributes 26 ❍ Expressing more than just document semantics with microdata 28 The HTML5 content model 29 Browser support 32 Supporting Internet Explorer 35 ❍ Enabling HTML5 support in Internet Explorer with html5.js 36 Summary 36 vii viii contents 2 HTML5 forms 38 The limitations of HTML4 forms 39 Numbers, ranges, dates, and times 42 Validation 46 The required attribute 47 ❍ The min, max, and pattern attributes 47 ❍ Taking advantage of validation with CSS 49 ❍ Turning off validation 50 Email and URLs 51 Email addresses 51 ❍ Web addresses Elements for user feedback The element 53 The element 56 Less-common form controls Telephone numbers 57 59 ❍ 53 53 ❍ The element 55 57 Color pickers 58 New attributes for the element 59 Placeholder text 59 ❍ Form autofocus 61 ❍ Protecting private information with the autocomplete attribute 61 Extending forms with JavaScript 62 Customizing the validation messages 62 ❍ Triggering validation with JavaScript 64 ❍ Responding to any changes in value 64 ❍ Creating combo boxes with 65 ❍ Easy ways to work with form values in JavaScript 67 Browser support and detecting HTML5 features 68 Browser inconsistencies 69 ❍ Detecting supported features 69 ❍ The html5-now library 71 Summary 72 3 Dynamic graphics 73 Getting started with : shapes, images, and text 74 Drawing shapes text 84 76 ❍ Placing images 82 ❍ Drawing Advanced : gradients, shadows, and animation 87 Creating gradients 88 ❍ Drawing drop shadows 91 Transformations 92 ❍ Animation 94 contents Getting started with SVG 96 Applying styles to SVG 98 ❍ Drawing common shapes 99 Images, text, and embedded content 101 ❍ Transforms, gradients, patterns, and declarative animation 105 SVG vs. 112 Browser support 114 Supporting in older versions of IE with explorercanvas 114 ❍ SVG in XML vs. SVG in HTML 115 Embedding SVG as an image 115 ❍ Referencing an SVG image from CSS 116 ❍ Embedding SVG as an object 116 SVG support in older browsers with SVG Web and Raphaël 116 Summary 118 4 Audio and video 119 Audio and video on the modern web 119 The