Subscribe: HTML Form Guide
Preview: HTML Form Guide

HTML Form Guide

All about web forms!

Last Build Date: Wed, 18 Oct 2017 09:14:14 +0000


How to create a select box with multiple selection

Wed, 18 Oct 2017 09:12:16 +0000

Having drop downs on our web page enhances the overall quality and design on the screen. A drop-down thus works as an alternative and in specific cases, a better option, as compared to radio buttons and checkboxes. Wait, what? Did we say an alternative to both radio buttons and checkboxes? But, it should have been […]

How to use the HTML5 range input type

Wed, 18 Oct 2017 09:07:57 +0000

Before the introduction of HTML5, thinking about having a range slider on a webpage was equivalent of a crime. You needed a bunch of custom javascript code and still it didn’t work well on all devices. However, HTML5 brought with it numerous new attributes and features that added the flavor that HTML missed for ages. […]

How to limit the max length of input in a textarea

Fri, 06 Oct 2017 13:49:42 +0000

The textarea in HTML is where the user can type in his answers or responses to the queries in free text. Unlike radio buttons, check boxes and drop downs, there are no fixed options, it is like the answer sheets we have during our exams. Wait, we know what you are thinking? “I usually write […]

How to validate an email address using JavaScript

Thu, 17 Aug 2017 13:59:24 +0000

Validating email address using regular expressions is tricky and is often not recommended. The reason is simple. A valid email address as defined by RFC 2822 can be quite complex. A valid email is of the format: name@domain The name can be a set of ‘atoms’ separated by dots. In its simplest form like this: […]

HTML submit button onclick code

Wed, 09 Aug 2017 12:41:15 +0000

An HTML button is created using the following HTML code: [crayon-5a4a6b34a733c948470783/] Or using the button tag like this: [crayon-5a4a6b34a734f895544575/] In both the cases, pressing the button will submit the parent form without the need for handling the onclick event separately. If you want to validate the form before submitting, the best event handler would be […]

Examples of javascript form validation using regular expressions

Tue, 08 Aug 2017 12:12:40 +0000

In this tutorial you will see how to use regular expressions to validate. Through a list of examples , we will build a script to validate phone numbers , UK postal codes, along with more examples. First, let’s start by building the webpage and the validation code then we will talk about the regular expressions […]

How to handle HTML checkbox events

Fri, 23 Jun 2017 12:00:05 +0000

The HTML checkbox input element allows you to select a single value for submission in a form for example if you are creating a form and want to know if the applicant is fluent in English or not you can have a checkbox and if the user thinks he/she is fluent in English he/she checks […]

HTML input type password field – example code and techniques

Thu, 22 Jun 2017 13:11:06 +0000

The HTML element is a specific type of input elements used to create input fields that deal with passwords . It is designed to deal with passwords so it’s more secure than the normal we see in every form on the internet. First: It makes the password not visible to anybody […]

How to Create a Telephone Input Field in HTML5

Sun, 07 May 2017 01:25:22 +0000

Though  field validation and data formatting are the biggest challenges of working with web browsers, HTML5 does some help in enforcing this for us. Telephone input field can be created using type=”tel”: [crayon-5a4a6b34a86e1455072330/] This looks like every other input field, with the difference that it optimizes the keyboard. Certain platforms like tablets, or smartphones will […]

How to Use Html5 Input Type Email

Fri, 05 May 2017 07:45:57 +0000

Before the advent of HTML5, handling emails addresses required more work to validate the email addresses using Javascript. Well all that is now not necessary with the new HTML5 input type email. The email input element has been specifically designed to handle and validate email addresses. Depending on the browser, it will alert the user […]