Mastering HTML5 Forms
eBook - ePub

Mastering HTML5 Forms

  1. 148 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Mastering HTML5 Forms

Book details
Book preview
Table of contents
Citations

About This Book

In Detail

HTML5 has given web developers the ability to easily develop sites and applications which, previously, were extremely time consuming. Now, they can not only build visually stunning forms and web pages, but can also increase the scope of their applications, as well as collect valuable user inputs and data through customized forms.

This practical guide will teach you how to create responsive forms, and how to link them to the database. This will enable you to take advantage of the power behind HTML5 elements for building forms, and make the user interfaces attractive and more interactive.

Explore the benefits of web forms, and learn how to create them using new HTML5 form elements. This guide will take you through a number of clear, practical examples that will help you to take advantage of the forms built and customized using HTML5 and related technologies, quickly and painlessly. Your ability to build responsive forms will be enhanced throughout the book.
You will also learn about the necessity of validations, CSS3 properties for improving the look of the form, and how to link the form to the server. Lastly, you will learn to make the standard forms responsive by making them compatible with desktops and mobile devices.

Approach

This tutorial will show you how to create stylish forms, not only visually appealing, but interactive and customized, in order to gather valuable user inputs and information.

Who this book is for

Enhance your skills in building responsive and dynamic web forms using HTML5, CSS3, and related technologies. All you need is a basic understanding of HTML and PHP.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Mastering HTML5 Forms by Gaurav Gupta in PDF and/or ePUB format, as well as other popular books in Computer Science & Web Programming. We have over one million books available in our catalogue for you to explore.

Information

Year
2013
ISBN
9781782164661
Edition
1

Mastering HTML5 Forms


Table of Contents

Mastering HTML5 Forms
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Forms and Their Significance
Understanding web forms
Benefits
HTML versus HTML5 forms
The form <input> types, elements, and attributes
The <form> <input> types
The <form> elements
The <form> attributes
Building an HTML5 form
Guidelines
Summary
2. Validation of Forms
Form validation
Client-side form validation
Server-side form validation
HTML5 form validation
Code 1 – validating a textbox using JavaScript
Code 2 – validating a textbox using HTML5 <form> controls
Constraint validations
HTML5 constraint validation APIs
The validity object
The checkValidity method
The setCustomValidity() method
The willValidate attribute
The validationMessage attribute
The patternMismatch property
The validity.patternMismatch attribute
The customError property
The validity.customError property
The rangeOverflow property
The validity.rangeOverflow property
The rangeUnderflow property
The validity.rangeUnderflow property
The stepMismatch property
The validity.stepMismatch property
The tooLong property
The validity.tooLong property
The typeMismatch property
The validity.typeMismatch property
The valueMissing property
The validity.valueMissing property
The valid property
The validity.valid property
Error messages
Summary
3. Styling the Forms
CSS3 for web forms
Selectors and pseudo-selectors
Backgrounds
The background-clip property
Syntax
Values
The background-origin property
Syntax
Values
The background-size property
Syntax
Values
The background-color property
The background-repeat property
The background-attachment property
Borders
The border-radius property
Syntax
Values
The box-shadow property
Syntax
Values
The border-image property
Syntax
Values
Text effects
The text-shadow property
Syntax
The word-wrap property
Syntax
Values
Fonts
The @font-face rule
Syntax
Font descriptors
The src font descriptor
The font-style font descriptor
The font-stretch font descriptor
The font-family font descriptor
The unicode-range font descriptor
The font-weight descriptor
Gradients
Syntax
Values
Styling the forms
Guidelines
Summary
4. Connection with Database
PHP
Syntax
Form handling
The GET method
The POST method
The filter method
Validating user input data
Sanitizing user input data
The FILTER_CALLBACK filter
Filter multiple inputs
MySQL
MySQL for PHP
MySQL-PHP connectivity
Open a connection to the MySQL server
Close a connection
Create or select a database
Create a database
Select a database
Create a table
Primary keys
Spoofing and forging forms
Forging HTTP requests
Spoofing submissions
Shared secrets
Setting expectations
Linking a form to a server
Summary
5. Responsive Web Forms
Responsive design
Google's view about responsive design
Benefits of using responsive design
How responsive design works
Screen resolutions
Viewport
Media queries
Media types
Internal media query
Syntax
External media query
Media features
Different screen resolutions
Small screen devices
High resolution displays of Apple mobile devices
For high resolution devices
For small screen high resolution devices
For large screen high resolution devices
Devices in landscape and portrait modes
Small screen devices in portrait mode only
Small screen devices in landscape mode only
Fluid grids
Fluid grid generators
960 grid system
Bootstrap
Adaptive images
Features
How it works
Customization
Making our form responsive
Limitations
Guidelines
Summary
Index

Mastering HTML5 Forms

Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies ...

Table of contents

  1. Mastering HTML5 Forms