HTML.form.guide

HTML Forms

How to create a select box with multiple selections

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 just the radio button, shouldn’t it? A radio button does not allow more than one selections and a checkbox, on the other hand, allows one or more than one selections.

Continue Reading →

How to use the HTML5 range input type

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. Not many would have expected something like the range element to make its entrance with HTML5, but once it did, hardly any have raised any concerns with its working.

Continue Reading →

How to limit the max length of input in a textarea

The textarea in HTML is where the user can type in his answers or responses to the queries in free text. Unlike radio buttons, checkboxes and dropdowns, 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 the same things multiple times for the same question in different ways to ensure the length of my answer goes up, what if the user does the same in the textarea?

Continue Reading →

How to handle HTML checkbox events

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 it if not leaves it unchecked . In this tutorial we are going to learn

Continue Reading →

HTML input type password field - example code and techniques

The HTML <input type="password”> 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 <input type='text’> we see in every form on the internet. First: It makes the password not visible to anybody sitting around you by showing “.” or “*” instead of the characters you type. Second: Browsers treat inputs with text type and password types differently, browsers may try to automatically refill the text input types if they have been previously entered which is something you may not always want.

Continue Reading →

How to Make a Form in HTML

Forms are essential components of any good website. A form makes it possible to collect user input. In this tutorial, we will learn how to create a form in HTML and we will also see how to process the form data. The <form> element The <form> element lets you create a form. Forms are used on a website to capture user inputs. In other words, forms are used to collect the values entered by the user on a web page.

Continue Reading →

How to make a form

This is a beginners tutorial on making web forms. Let us first see the working of a web form. A form has two parts: the client-side and the server-side. The client-side is coded using HTML, CSS and some Javascript. The server-side is usually coded using a scripting language available on the web server like PHP, ASP, Ruby or Perl. [] Coding the client-side of the form Here is the sample HTML code for a simple form:

Continue Reading →

Fixing the auto-focus

Focusing on an input element just as the user loads the form will easily be a great usability enhancement. However, doing it the wrong will cause problem for at least some users. Setting focus in onload() event Most websites make the mistake of setting the focus in the onload() event. This can cause troubles for the user. <body onload='document.myform.username.focus();' > Imagine a login form. The web page is being loaded and the login form appears.

Continue Reading →

Simfatic Forms: HTML form generator tool

Hand-coding HTML forms using the common web design tools used to be a long and cumbersome process. HTML code for the form is just one part of the whole web form. You need the server side processing script as well. Simfatic Forms is a tool that fills this gap. You can design the web form using the visual editor. No coding is required. Simfatic Forms generates all the required code ( The HTML code and the server side processing script).

Continue Reading →

HTML form input examples

HTML form input examples When you are creating an HTML form, there are several different options for input elements to use. If you can efficiently use the non-textbox components as much as possible, you will make your form easier on your users. To start your HTML form, just enter the opening and closing tags and . Between these two tags, you will fit as many other elements as necessary.

Continue Reading →

Setting the Form Action with a JavaScript Function

In an HTML form, the action attribute is used to indicate where the form's data is sent to when it is submitted. The value of this can be set when the form is created, but at times you might want to set it dynamically. In this tutorial, we'll look at ways in which a form's action attribute can be set dynamically by JavaScript. To get started, create an HTML file and paste the following form to its body.

Continue Reading →