Book Image

HTML5 Multimedia Development Cookbook

Book Image

HTML5 Multimedia Development Cookbook

Overview of this book

HTML5 is the most significant new advancement the web has seen in many years. HTML5 adds many new features including the video, audio, and canvas elements, as well as the integration of SVG. This cookbook is packed full of recipes that will help you harness HTML5’s next generation multimedia features. HTML5 is the future.Whether you’re a seasoned pro or a total newbie, this book gives you the recipes that will serve as your practical guide to creating semantically rich websites and apps using HTML5. Get ready to perform a quantum leap harnessing HTML5 to create powerful, real world applications. Many of the new key features of HTML5 are covered, with self-contained practical recipes for each topic. Forget hello world. These are practical recipes you can utilize straight away to create immersive, interactive multimedia applications. Create a stylish promo page in HTML5. Use SVG to replace text dynamically. Use CSS3 to control background size and appearance. Use the Canvas to process images dynamically. Apply custom playback controls to your video.
Table of Contents (16 chapters)
HTML5 Multimedia Development Cookbook
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface

Adding a URL using the URL input type


Another of the many new input types that HTML5 supports is URL. How many times have you built a form using <input type="text" /> intending to collect a website address? Now we can use something much more semantically correct! Later we'll see how this supports form validation as well.

How to do it...

The previous FoundationSix example could be easily converted to this new input type as well. Instead of:

<li>
<label for="website">Website</label>
<input id="website" name="website" type="text" class="required">
</li>

We could simply change the input type and end up with:

<li>
<label for="website">Website</label>
<input id="website" name="website" type="URL" class="required">
</li>

Like <input type="email" /> visually, the <input type="URL" /> tag looks identical to <input type="text" />. Again, the difference is what the browser does with the information entered.

How it works...