{"id":1505,"date":"2016-06-15T14:22:38","date_gmt":"2016-06-15T14:22:38","guid":{"rendered":"http:\/\/www.capitalnumbers.com\/blog\/?p=1505"},"modified":"2025-08-11T11:30:46","modified_gmt":"2025-08-11T11:30:46","slug":"html5-form-best-practices","status":"publish","type":"post","link":"https:\/\/www.capitalnumbers.com\/blog\/html5-form-best-practices\/","title":{"rendered":"HTML5 Form Best Practices"},"content":{"rendered":"<p><!--<a href=\"http:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2016\/06\/CN_Blog_HTML5_15-06-16.jpg\"><img class=\"aligncenter size-full wp-image-1511\" src=\"http:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2016\/06\/CN_Blog_HTML5_15-06-16.jpg\" alt=\"CN_Blog_HTML5_15-06-16\" width=\"1200\" height=\"638\" srcset=\"https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2016\/06\/CN_Blog_HTML5_15-06-16.jpg 1200w, https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2016\/06\/CN_Blog_HTML5_15-06-16-300x160.jpg 300w, https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2016\/06\/CN_Blog_HTML5_15-06-16-768x408.jpg 768w, https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2016\/06\/CN_Blog_HTML5_15-06-16-1024x544.jpg 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a>--><\/p>\n<p><span style=\"font-weight: 400;\">A modern and responsive website is no longer just a portal that acts as a communication channel\u2014for sharing information\u2014 between the organizations with its clients. For you to be successful with your website strategy\u2014attracting visitors and converting them into leads and customers\u2014you have to design a web form that establishes an affable relationship with the clients. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">This article discusses some of the best practices that you can use in HTML5 to create a sensational and an affable website for your firm\u2019s bottom line. Let\u2019s get started. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">A typical Web form can have the following components:<\/span><\/p>\n<p>* Labels &#8211; Explains about the corresponding input fields<br \/>\n* Input Fields &#8211; Enables users to provide details.<br \/>\n* Actions &#8211; this attribute defines the action to be performed when the form is submitted.<br \/>\n* Message &#8211; Gives information about the form submission.<br \/>\n* Validation &#8211; It ensures that the data submitted by the user comply with rules provided.<\/p>\n<p><strong><span style=\"font-weight: 400;\">Apart from layout, functionality and purpose, all forms have 3 main aspects which needs to be handled to make a form usable:<\/span><\/strong><\/p>\n<h6><span style=\"color: #000000;\"><strong>Relationship<\/strong><\/span><\/h6>\n<p>It is important to know your user for the establishment of a good business relationship. To do this following steps can be followed:<\/p>\n<p>1. Trust can be built by using logo, imagery, color, typography and wording.<br \/>\n2. Name the form according to its purpose which will inform users what the form is about.<br \/>\n3. Always try to be in scope of the form. Don\u2019t ask any questions beyond that.<\/p>\n<h6><span style=\"color: #000000;\"><strong>Conversation<\/strong><\/span><\/h6>\n<p>A form is the communication platform between the user and the organization. So this needs to be logical and to the point. The below mentioned points are advisable:<\/p>\n<p>1. Labels needs to be ordered logically.<br \/>\n2. All the Related information are advised to be grouped.<\/p>\n<h6><span style=\"color: #000000;\"><strong>Appearance<\/strong><\/span><\/h6>\n<p><strong>1. Label<\/strong><\/p>\n<p>a. Position &#8211; Label above an input field works better for maximum readability.<br \/>\nb. Alignment &#8211; Placing labels above input fields is preferable, but make them right aligned if you place them to the left of input fields.<br \/>\nc. Bold labels\u2014Bold labels is bit difficult to read, so it is preferable to use plain text labels.<\/p>\n<p><strong>2. Input Fields<\/strong><\/p>\n<p>a. Type &#8211; Provide the appropriate type based on the requirements.<br \/>\nb. Required &#8211; Clearly mention which fields cannot be left blank.<br \/>\nc. Placeholder &#8211; Do not use this attribute alone.<br \/>\nd. Autocomplete &#8211; Activate this to get faster user input.<\/p>\n<p><strong>3. Actions<\/strong><\/p>\n<p>a. Naming conventions &#8211; Descriptive words for buttons are preferred. Because it will ensure the purpose of the button clearly.<\/p>\n<p><strong>4. Message<\/strong><\/p>\n<p>a. Success &#8211; Notify the users for successful form submission.<br \/>\nb. Error &#8211; Notify the users for errors in form submission.<\/p>\n<p><strong>5. Validation<\/strong><\/p>\n<p>a. Restrict validation to the key points because excessive validation will frustrate users.<br \/>\nb. Use both client side and server side validation. It will ensure the validation in spite of having JavaScript turned off in user\u2019s browser and we can get better user experience with fast response and more secure validation.<br \/>\nc. Use captcha to protect the human-generated spam.<br \/>\nd. You can use Honeypot Technique as well over captcha because no user interaction is required.<\/p>\n<h6><span style=\"color: #000000;\"><strong>Accessibility &amp; Mark-up<\/strong><\/span><\/h6>\n<p><strong>1. Use &lt;label&gt; tags to link labels with inputs.<\/strong><\/p>\n<p>a. Properly read by screen readers.<br \/>\nb. Most browsers treat text with &lt;label&gt; tags as clickable: larger actions.<\/p>\n<p><strong>2. Use the tabindex attribute.<\/strong><\/p>\n<p>a. Provides control over tabbing order.<br \/>\nb. Enables forms to be navigated by keyboard.<\/p>\n<p><strong>3. Consider the accesskey attribute for additional keyboard support.<\/strong><\/p>\n<p>a. Direct access to associated input fields.<br \/>\nb. Consider to group related form fields.<\/p>\n<div id=\"om-b7tfondceubrbvku-holder\"><\/div>\n<p><script>\/\/ <![CDATA[\nvar b7tfondceubrbvku,b7tfondceubrbvku_poll=function(){var r=0;return function(n,l){clearInterval(r),r=setInterval(n,l)}}();!function(e,t,n){if(e.getElementById(n)){b7tfondceubrbvku_poll(function(){if(window['om_loaded']){if(!b7tfondceubrbvku){b7tfondceubrbvku=new OptinMonsterApp();return b7tfondceubrbvku.init({u:\"18402.328170\",staging:0,dev:0,beta:0});}}},25);return;}var d=false,o=e.createElement(t);o.id=n,o.src=\"\/\/a.optnmnstr.com\/app\/js\/api.min.js\",o.onload=o.onreadystatechange=function(){if(!d){if(!this.readyState||this.readyState===\"loaded\"||this.readyState===\"complete\"){try{d=om_loaded=true;b7tfondceubrbvku=new OptinMonsterApp();b7tfondceubrbvku.init({u:\"18402.328170\",staging:0,dev:0,beta:0});o.onload=o.onreadystatechange=null;}catch(t){}}}};(document.getElementsByTagName(\"head\")[0]||document.documentElement).appendChild(o)}(document,\"script\",\"omapi-script\");\/\/ ]]><\/script><!-- \/ OptinMonster --><\/p>\n<h6><span style=\"color: #003366;\">#1: Always use smart defaults<\/span><\/h6>\n<p>Typing can be tiresome for your customers. You can promote your firm\u2019s bottom line by doing the hard work of typing for your customers. For instance, you can pre-populate the information\u2014such as e-mail addresses and the country of origin\u2014on your web form if you already know about your visitor. I know you\u2019re thinking, \u201cHow is this possible?\u201d<\/p>\n<p>Well, you can use the visitor\u2019s IP address to geographically locate his\/her country of origin so that such a customer doesn\u2019t have to scroll down through a long list of countries to select his\/her country. You can also make sensible guesses the options that your customers will be picking.<\/p>\n<h6><span style=\"color: #003366;\">#2: The inline form validation is always the King!<\/span><\/h6>\n<p>It\u2019s disheartening to fill out a form and hit the send button only to get an error message that the form hasn\u2019t been filled correctly. You can avoid this scenario by ensuring that you\u2019ve implemented the inline form validation. The in-line validation ensures that errors are captured immediately a user moves from one field to another.<\/p>\n<p>Even though this task may be quite daunting, you can implement HTML5 validation checks to ensure that your forms have the correct in-line validation.<\/p>\n<h6><span style=\"color: #003366;\">#3: Always top or right-align form labels<\/span><\/h6>\n<p>Knowing the right alignment for the form labels helps your customer to have an easy time while navigating on the web form. If the form labels are aligned improperly, your visitors or customer may want to postpone the filling out process to a later time\u2014which may not promote your bottom line. So, which alignment is the best?<\/p>\n<p>Ideally, top or right-alignment for the form labels are usually regarded as the best form of form alignment. This is because they provide a closer proximity to the form label thereby reducing the distance that the eye has to move in order to fill out the detail.<\/p>\n<h6><span style=\"color: #003366;\">#4: Inform your visitors why you\u2019re asking for the information<\/span><\/h6>\n<p>Always explain to your visitors why you\u2019re asking for that data. For instance, some customers will not be willing to share their data such as telephone numbers if they know they will be blasted with several unsolicited calls. The same applies to e-mail addresses. However, if you explain to such customers why you\u2019re interested in such data, then they will fill out the form on your website.<\/p>\n<h6><span style=\"color: #003366;\">#5: Always ensure your CAPTCHAS are working fine<\/span><\/h6>\n<p>There\u2019s no doubt about the power of CAPTCHAS in helping to differentiate between human beings and the machines. However, CAPTCHAS can cause problems on your forms and affect the submission rates. To remedy this problem, always ensure your CAPTCHAS\u2014whether they are letters, logical questions or even image recognitions\u2014are easy to read by the customer.<\/p>\n<h6><span style=\"color: #003366;\">#6: Make the CTAs clear to the customer<\/span><\/h6>\n<p>Always check to ensure that the call-to-action text is clear to the website visitor. For instance, if you\u2019re designing a multi-stage checkout system, you should ensure that your customers know the stage they are proceeding to. You can use words such as \u201cProceed to Payment\u201d or \u201cComplete the Order\u201d instead of \u201cProceed\u201d and \u201cComplete.\u201d<\/p>\n<h6><span style=\"color: #003366;\">#7: Don\u2019t make your customers create unnecessary usernames<\/span><\/h6>\n<p>Human beings are prone to forget usernames and passwords. Asking your visitors to formulate usernames may cause problems for them when they try to remember such names in future. You can use their e-mail addresses since the e-mail address is already unique and the customers can easily remember it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A modern and responsive website is no longer just a portal that acts as a communication channel\u2014for sharing information\u2014 between the organizations with its clients. For you to be successful with your website strategy\u2014attracting visitors and converting them into leads and customers\u2014you have to design a web form that establishes an affable relationship with the &#8230;<\/p>\n","protected":false},"author":12,"featured_media":1511,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false},"categories":[723,743],"tags":[1054,1057],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts\/1505"}],"collection":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/comments?post=1505"}],"version-history":[{"count":4,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts\/1505\/revisions"}],"predecessor-version":[{"id":16321,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts\/1505\/revisions\/16321"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/media\/1511"}],"wp:attachment":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/media?parent=1505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/categories?post=1505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/tags?post=1505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}