{"id":397,"date":"2021-07-09T10:30:00","date_gmt":"2021-07-09T05:00:00","guid":{"rendered":"https:\/\/wpproonline.com\/?p=397"},"modified":"2026-02-26T10:44:28","modified_gmt":"2026-02-26T10:44:28","slug":"chapter-17-input-control-elements","status":"publish","type":"post","link":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/","title":{"rendered":"Chapter 17: Input Control Elements"},"content":{"rendered":"\n<figure>\n<table>\n<tbody>\n<tr>\n<td><strong>Parameter<\/strong><\/td>\n<td><strong>Details<\/strong><\/td>\n<\/tr>\n<tr>\n<td><em>class<\/em><\/td>\n<td>Indicates the Class of the input<\/td>\n<\/tr>\n<tr>\n<td><em>id<\/em><\/td>\n<td>ndicates the ID of the input<\/td>\n<\/tr>\n<tr>\n<td><em>type<\/em><\/td>\n<td>Identifies the type of input control to display. Acceptable values are hidden, text, tel, url, email,<br \/>password, date, time, number, range, color, checkbox, radio, file, submit, image, reset, and button.<br \/>Defaults to text if not specified, if the value is invalid, or if the browser does not support the type<br \/>specified.<\/td>\n<\/tr>\n<tr>\n<td><em>name<\/em><\/td>\n<td>Indicates the name of the input<\/td>\n<\/tr>\n<tr>\n<td><em>disabled<\/em><\/td>\n<td>Boolean value that indicates the input should be disabled. Disabled controls cannot be edited, are<br \/>not sent on form submission, and cannot receive focus.<\/td>\n<\/tr>\n<tr>\n<td><em>checked<\/em><\/td>\n<td>When the value of the type attribute is radio or checkbox, the presence of this Boolean attribute<br \/>indicates that the control is selected by default; otherwise it is ignored.<\/td>\n<\/tr>\n<tr>\n<td><em>multiple<\/em><\/td>\n<td><strong>HTML5<\/strong> Indicates multiple files or values can be passed (Applies only to file and email type inputs )<\/td>\n<\/tr>\n<tr>\n<td><em>placeholder<\/em><\/td>\n<td><strong>HTML5<\/strong> A hint to the user of what can be entered in the control . The placeholder text must not<br \/>contain carriage returns or line-feeds<\/td>\n<\/tr>\n<tr>\n<td><em>autocomplete<\/em><\/td>\n<td><strong>HTML5 <\/strong>Indicates whether the value of the control can be automatically completed by the browser.<\/td>\n<\/tr>\n<tr>\n<td><em>readonly<\/em><\/td>\n<td>Boolean value that indicates the input is not editable. Readonly controls are still sent on form<br \/>submission, but will not receive focus. <strong>HTML5:<\/strong> This attribute is ignored when the value of type<br \/>attribute is either set to hidden, range, color, checkbox, radio, file or button.<\/td>\n<\/tr>\n<tr>\n<td><em>required<\/em><\/td>\n<td><strong>HTML5<\/strong> Indicates a value must be present or the element must be checked in order for the form to<br \/>be submitted<\/td>\n<\/tr>\n<tr>\n<td><em>alt<\/em><\/td>\n<td>An alternative text for images, in case they are not displayed.<\/td>\n<\/tr>\n<tr>\n<td><em>autofocus<\/em><\/td>\n<td>The <strong><em>&lt;input&gt;<\/em><\/strong> element should get the focus when page loads.<\/td>\n<\/tr>\n<tr>\n<td><em>value<\/em><\/td>\n<td>Specifies the value of <strong><em>&lt;input&gt;<\/em><\/strong> element.<\/td>\n<\/tr>\n<tr>\n<td><em>step<\/em><\/td>\n<td>The step attribute specifies the legal number intervals. It works with the following input types:<br \/>number, range, date, datetime-local, month, time and week.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n<p><!--more--><\/p>\n\n<p class=\"wp-block-paragraph\">A key component of interactive web systems, input tags are HTML elements designed to take a specific form of<br \/>input from users. Different types of input elements can regulate the data entered to fit a specified format and<br \/>provide security to password entry.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-text\">Text<\/h2>\n\n<p class=\"wp-block-paragraph\">The most basic input type and the default input if no type is specified. This input type defines a single-line text field with line-breaks automatically removed from the input value. All other characters can be entered into this. <strong><em>&lt;input&gt;<\/em><\/strong> elements are used within a <strong><em>&lt;form&gt;<\/em><\/strong> element to declare input controls that allow users to input data.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Syntax<\/strong><\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"text\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">or (without specifying a type, using the default attribute):<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">The default width of a text field input is 20 characters. This can be changed by specifying a value for the size<br \/>attribute like this:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"text\" size=\"50\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">The size attribute is distinctly different than setting a width with CSS. Using a width defines a specific value (in<br \/>number of pixel, percentage of the parent element, etc.) that the input must always be wide. Using the size<br \/>calculates the amount of width to allocate based on the font being used and how wide the characters normally are.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Using the <em><strong>size<\/strong><\/em> attribute does not inherently limit the number of characters which can be entered into the<br \/>box, only how wide the box is displayed. For limiting the length, see Input Validation.<\/p>\n\n<p class=\"wp-block-paragraph\">An input field only allows one line of text. If you need a multi-line text input for substantial amount of text, use a <strong><em>&lt;textarea&gt;<\/em><\/strong> element instead.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-checkbox-and-radio-buttons\">Checkbox and Radio Buttons<\/h2>\n\n<p class=\"wp-block-paragraph\"><strong>Overview<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">Checkboxes and radio buttons are written with the HTML tag , and their behavior is defined in the HTML specification.<\/p>\n\n<p class=\"wp-block-paragraph\">The simplest checkbox or radio button is an <strong><em>&lt;input&gt;<\/em><\/strong> element with a type attribute of checkbox or radio, respectively:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"checkbox\"&gt;\n&lt;input type=\"radio\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">A single stand-alone checkbox element is used for a single binary option such as a yes-or-no question. Checkboxes<br \/>are independent, meaning the user may select as many choices as they would like in a group of checkboxes. In<br \/>other words, checking one checkbox does not uncheck the other checkboxes in checkbox group.<\/p>\n\n<p class=\"wp-block-paragraph\">Radio buttons usually come in groups (if it&#8217;s not grouped with another radio button, you probably meant to use a<br \/>checkbox instead) identified by using the same name attribute on all buttons within that group. The selection of<br \/>radio buttons are <em>mutually exclusive<\/em>, meaning the user may only select one choice from a group of radio buttons.<br \/>When a radio button is checked, any other radio button with the same name that was previously checked becomes<br \/>unchecked.<\/p>\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"radio\" name=\"color\" id=\"red\" value=\"#F00\"&gt;\n&lt;input type=\"radio\" name=\"color\" id=\"green\" value=\"#0F0\"&gt;\n&lt;input type=\"radio\" name=\"color\" id=\"blue\" value=\"#00F\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">When viewed, radio buttons appear as a circle (unchecked) or a filled circle (checked). Checkboxes appear as a<br \/>square (unchecked) or a filled square (checked). Depending on the browser and operating system, the square<br \/>sometimes has rounded corners.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Attributes<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">checkboxes and radio buttons have a number of attributes to control their behavior:<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>value<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">Like any other input element, the value attribute specifies the string value to associate with the button in the event<br \/>of form submission. However, checkboxes and radio buttons are special in that when the value is omitted, it<br \/>defaults to on when submitted, rather than sending a blank value. The value attribute is not reflected in the<br \/>button&#8217;s appearance.<\/p>\n\n<p class=\"wp-block-paragraph\">checked<\/p>\n\n<p class=\"wp-block-paragraph\">The checked attribute specifies the initial state of a checkbox or radio button. This is a boolean attribute and may<br \/>be omitted.<\/p>\n\n<p class=\"wp-block-paragraph\">Each of these are valid, equivalent ways to define a checked radio button:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input checked&gt;\n&lt;input checked=\"\"&gt;\n&lt;input checked=\"checked\"&gt;\n&lt;input checked=\"ChEcKeD\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">The absence of the checked attribute is the only valid syntax for an unchecked button:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"radio\"&gt;\n&lt;input type=\"checkbox\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">When resetting a <strong><em>&lt;form&gt;<\/em><\/strong>, checkboxes and radio buttons revert to the state of their checked attribute.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Accessibility<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Labels<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">To give context to the buttons and show users what each button is for, each of them should have a label. This can be done using a <strong><em>&lt;label&gt;<\/em><\/strong> element to wrap the button. Also, this makes the label clickable, so you select the corresponding button.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;label&gt;\n &lt;input type=\"radio\" name=\"color\" value=\"#F00\"&gt;\n Red\n&lt;\/label&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">or with a <strong><em>&lt;label&gt;<\/em><\/strong> element with a for attribute set to the id attribute of the button:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"checkbox\" name=\"color\" value=\"#F00\" id=\"red\"&gt;\n&lt;label for=\"red\"&gt;Red&lt;\/label&gt;\n<\/pre>\n\n<p class=\"wp-block-paragraph\"><strong>Button Groups<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">Since each radio button affects the others in the group, it is common to provide a label or context for the entire<br \/>group of radio buttons.<\/p>\n\n<p class=\"wp-block-paragraph\">To provide a label for the entire group, the radio buttons should be included in a <em><strong>&lt;fieldset&gt;<\/strong><\/em> element with a <strong><em>&lt;legend&gt;<\/em><\/strong> element within it.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;fieldset&gt;\n &lt;legend&gt;Theme color:&lt;\/legend&gt;\n &lt;p&gt;\n &lt;input type=\"radio\" name=\"color\" id=\"red\" value=\"#F00\"&gt;\n &lt;label for=\"red\"&gt;Red&lt;\/label&gt;\n &lt;\/p&gt;\n &lt;p&gt;\n &lt;input type=\"radio\" name=\"color\" id=\"green\" value=\"#0F0\"&gt;\n &lt;label for=\"green\"&gt;Green&lt;\/label&gt;\n &lt;\/p&gt;GoalKicker.com \u2013 HTML5 Notes for Professionals 46\n &lt;p&gt;\n &lt;input type=\"radio\" name=\"color\" id=\"blue\" value=\"#00F\"&gt;\n &lt;label for=\"blue\"&gt;Blue&lt;\/label&gt;\n &lt;\/p&gt;\n&lt;\/fieldset&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">Checkboxes can also be grouped in a similar fashion, with a fieldset and legend identifying the group of related<br \/>checkboxes. However, keep in mind that checkboxes should not share the same name because they are not<br \/>mutually exclusive. Doing this will result in the form submitting multiple values for the same key and not all server\u0002side languages handle this in the same way (undefined behavior). Each checkbox should either have a unique<br \/>name, or use a set of square brackets ([]) to indicate that the form should submit an array of values for that key.<br \/>Which method you choose should depend on how you plan to handle the form data client-side or server-side. You<br \/>should also keep the legend short, since some combinations of browsers and screen readers read the legend<br \/>before each input field in the fieldset.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-input-validation\">Input Validation<\/h2>\n\n<p class=\"wp-block-paragraph\">HTML input validation is done automatically by the browser based on special attributes on the input element. It<br \/>could partially or completely replace JavaScript input validation. This kind of validation can be circumvented by the<br \/>user via specially crafted HTTP requests, so it does not replace server-side input validation. The validation only<br \/>occurs when attempting to submit the form, so all restricted inputs must be inside a form in order for validation to<br \/>occur (unless you&#8217;re using JavaScript). Keep in mind that inputs which are disabled or read-only will not trigger<br \/>validation.<\/p>\n\n<p class=\"wp-block-paragraph\">Some newer input types (like email, url, tel, date and many more ) are automatically validated and do not require<br \/>your own validation constraints.<\/p>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<br \/><strong>Required<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">Use the required attribute to indicate that a field must be completed in order to pass validation.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong><em>&lt;input<\/em><\/strong> required<strong><em>&gt;<\/em><\/strong><\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Minimum \/ Maximum Length<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">Use the minlength and maxlength attributes to indicate length requirements. Most browsers will prevent the user<br \/>from typing more than max characters into the box, preventing them from making their entry invalid even before<br \/>they attempt submission.<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input minlength=\"3\"&gt;\n&lt;input maxlength=\"15\"&gt;\n&lt;input minlength=\"3\" maxlength=\"15\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\"><strong>Specifying a range<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">Use min and max attributes to restrict the range of numbers a user can input into an input of type number or range<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Marks: &lt;input type=\"number\" size=\"6\" name=\"marks\" min=\"0\" max=\"100\" \/&gt;\nSubject Feedback: &lt;input type=\"range\" size=\"2\" name=\"feedback\" min=\"1\" max=\"5\" \/&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<br \/><strong>Match a Pattern<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">For more control, use the pattern attribute to specify any regular expression that must be matched in order to<br \/>pass validation. You can also specify a title, which is included in the validation message if the field doesn&#8217;t pass.<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input pattern=\"d*\" title=\"Numbers only, please.\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">Here&#8217;s the message shown in Google Chrome version 51 when attempting to submit the form with an invalid value<br \/>inside this field:<\/p>\n\n<figure><img decoding=\"async\" src=\"https:\/\/digitalhubz.com\/wp-content\/uploads\/2021\/06\/wp-pro3.png\" alt=\"\" \/><\/figure>\n\n<p class=\"wp-block-paragraph\">Not all browsers display a message for invalid patterns, although there is full support among most used modern<br \/>browsers.<\/p>\n\n<p class=\"wp-block-paragraph\">Check the latest support on CanIUse and implement accordingly.<\/p>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<br \/><strong>Accept File Type<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">For input fields of type file, it is possible to accept only certain types of files, such as videos, images, audios,<br \/>specific file extensions, or certain media types. For example:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"file\" accept=\"image\/*\" title=\"Only images are allowed\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">Multiple values can be specified with a comma, e.g.:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"file\" accept=\"image\/*,.rar,application\/zip\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\"><strong>Note: <\/strong>Adding novalidate attribute to the<em><strong> form<\/strong><\/em> element or<em> <strong>formnovalidate<\/strong><\/em> attribute to the submit button, prevents<br \/>validation on form elements. For example:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;form&gt;\n &lt;input type=\"text\" name=\"name\" required&gt;\n &lt;input type=\"email\" name=\"email\" required&gt;\n &lt;input pattern=\"d*\" name=\"number\" required&gt;\n &lt;input type=\"submit\" value=\"Publish\"&gt; &lt;!-- form will be validated --&gt;\n &lt;input type=\"submit\" value=\"Save\" formnovalidate&gt; &lt;!-- form will NOT be validated --&gt;\n&lt;\/form&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">The form has fields that are required for &#8220;publishing&#8221; the draft but aren\u2019t required for &#8220;saving&#8221; the draft.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-color\">Color<\/h2>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"color\" name=\"favcolor\" value=\"#ff0000\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">In supporting browsers, the input element with a type attribute whose value is color creates a button-like control,<br \/>with a color equal to the value of color attribute (defaults to black if value is not specified or is an invalid<br \/>hexadecimal format).<\/p>\n\n<figure><img decoding=\"async\" src=\"https:\/\/digitalhubz.com\/wp-content\/uploads\/2021\/06\/wp-4.png\" alt=\"\" \/><\/figure>\n\n<p class=\"wp-block-paragraph\">Clicking this button opens the operating system&#8217;s color widget, which allows user to select a color.<\/p>\n\n<figure><img decoding=\"async\" src=\"https:\/\/digitalhubz.com\/wp-content\/uploads\/2021\/06\/wp-5.jpg\" alt=\"\" \/><\/figure>\n\n<p class=\"wp-block-paragraph\">Fallback for browsers which do not support this input type is a regular input <em><strong>type=text<\/strong><\/em>.<\/p>\n\n<figure><img decoding=\"async\" src=\"https:\/\/digitalhubz.com\/wp-content\/uploads\/2021\/06\/wp-6.png\" alt=\"\" \/><\/figure>\n\n<h2 class=\"wp-block-heading\" id=\"h-password\">Password<\/h2>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"password\" name=\"password\"&gt;\n<\/pre>\n\n<p class=\"wp-block-paragraph\">The input element with a type attribute whose value is password creates a single-line text field similar to the input<br \/><em><strong>type=text<\/strong><\/em>, except that text is not displayed as the user enters it.<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"password\" name=\"password\" placeholder=\"Password\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">Placeholder text is shown in plain text and is overwritten automatically when a user starts typing.<\/p>\n\n<figure><img decoding=\"async\" src=\"https:\/\/digitalhubz.com\/wp-content\/uploads\/2021\/06\/wp-7.gif\" alt=\"\" \/><\/figure>\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Some browsers and systems modify the default behavior of the password field to also display the most<br \/>recently typed character for a short duration, like so:<\/p>\n\n<figure><img decoding=\"async\" src=\"https:\/\/digitalhubz.com\/wp-content\/uploads\/2021\/06\/wp-8.jpg\" alt=\"\" \/><\/figure>\n\n<h2 class=\"wp-block-heading\" id=\"h-file\">File<\/h2>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"file\" name=\"fileSubmission\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">File inputs allow users to select a file from their local filesystem for use with the current page. If used in conjunction<br \/>with a form element, they can be used to allow users to upload files to a server (for more info see Uploading Files).<\/p>\n\n<p class=\"wp-block-paragraph\">The following example allows users to use the file input to select a file from their filesystem and upload that file to<br \/>a script on the server named <em>upload_file.php<\/em>.<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;form action=\"upload_file.php\" method=\"post\" enctype=\"multipart\/form-data\"&gt;\n Select file to upload:\n &lt;input type=\"file\" name=\"fileSubmission\" id=\"fileSubmission\"&gt;\n &lt;input type=\"submit\" value=\"Upload your file\" name=\"submit\"&gt;\n&lt;\/form&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\"><strong>Multiple files<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">Adding the multiple attribute the user will be able to select <strong>more than one<\/strong> file:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"file\" name=\"fileSubmission\" id=\"fileSubmission\" multiple&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\"><strong>Accept Files<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\">Accept attribute specifies the types of files that user can select. <em>E.g. .png, .gif, .jpeg.<\/em><\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"file\" name=\"fileSubmission\" accept=\"image\/x-png,image\/gif,image\/jpeg\" \/&gt;\n<\/pre>\n\n<h2 class=\"wp-block-heading\" id=\"h-button\">Button<\/h2>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"button\" value=\"Button Text\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">Buttons can be used for triggering actions to occur on the page, without submitting the form. You can also use the <strong><em>&lt;button&gt;<\/em><\/strong> element if you require a button that can be more easily styled or contain other elements:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;button type=\"button\"&gt;Button Text&lt;\/button&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">Buttons are typically used with an &#8220;onclick&#8221; event:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"button\" onclick=\"alert('hello world!')\" value=\"Click Me\"&gt;\n<\/pre>\n\n<p class=\"wp-block-paragraph\">or<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;button type=\"button\" onclick=\"alert('hello world!')\"&gt;Click Me&lt;\/button&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\"><strong>Attributes<\/strong><br \/>[name]<\/p>\n\n<p class=\"wp-block-paragraph\">The <em>name<\/em> of the button, which is submitted with the form data.<\/p>\n\n<p class=\"wp-block-paragraph\">[<em>type<\/em>]<\/p>\n\n<p class=\"wp-block-paragraph\">The <em>type<\/em> of the button.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Possible values are:<\/strong><\/p>\n\n<p class=\"wp-block-paragraph\"><em><strong>submit<\/strong> <\/em>: The button submits the form data to the server. This is the default if the attribute is not specified, or if the<br \/>attribute is dynamically changed to an empty or invalid value.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong><em>reset<\/em><\/strong> : The button resets all the controls to their initial values.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong><em>button<\/em><\/strong> : The button has no default behavior. It can have client-side scripts associated with the element&#8217;s events,<br \/>which are triggered when the events occur.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong><em>menu<\/em><\/strong> : The button opens a popup menu defined via its designated element.<\/p>\n\n<p class=\"wp-block-paragraph\">[<em>value<\/em>]<\/p>\n\n<p class=\"wp-block-paragraph\">The initial value of the button.<br \/>Version \u2265 5<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Extra Attributes for Submit Buttons<\/strong><\/p>\n\n<figure>\n<table>\n<tbody>\n<tr>\n<td><strong>Attribute<\/strong><\/td>\n<td><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td><em>form<\/em><\/td>\n<td>Specifies the ID of the form the button belongs to.<br \/>If none is specified, it will belong to its ancestor form element (if one exists).<\/td>\n<\/tr>\n<tr>\n<td><em>formaction<\/em><\/td>\n<td>Specifies where to send the form-data<br \/>when the form is submitted using this button.<\/td>\n<\/tr>\n<tr>\n<td><em>formenctype<\/em><\/td>\n<td>Specifies how the form-data should be encoded<br \/>when submitting it to the server using this button.<br \/>Can only be used with<em> formmethod=&#8221;post&#8221;<\/em>.<\/td>\n<\/tr>\n<tr>\n<td><em>formmethod<\/em><\/td>\n<td>Specifies the HTTP method to use (POST or GET)<br \/>when sending form-data using this button.<\/td>\n<\/tr>\n<tr>\n<td><em>formnovalidate<\/em><\/td>\n<td>Specifies that the form-data should not be validated on submission.<\/td>\n<\/tr>\n<tr>\n<td><em>formtarget<\/em><\/td>\n<td>Specifies where to display the response that is received<br \/>after submitting the form using this button.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n<h2 class=\"wp-block-heading\" id=\"h-submit\">Submit<\/h2>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"submit\" value=\"Submit\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">A submit input creates a button which submits the form it is inside when clicked.<\/p>\n\n<p class=\"wp-block-paragraph\">You can also use the <strong><em>&lt;button&gt;<\/em><\/strong> element if you require a submit button that can be more easily styled or contain other elements:<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;button type=\"submit\"&gt;\n &lt;img src=\"submit-icon.jpg\" \/&gt; Submit\n&lt;\/button&gt;<\/pre>\n\n<h2 class=\"wp-block-heading\" id=\"h-reset\">Reset<\/h2>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"reset\" value=\"Reset\"&gt;\n<\/pre>\n\n<p class=\"wp-block-paragraph\">An input of type reset creates a button which, when clicked, resets all inputs in the form it is contained in to their<br \/>default state.<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Text in an input field will be reset to blank or its default value (specified using the value attribute).<\/li>\n<li>Any option(s) in a selection menu will be deselected unless they have the selected attribute.<\/li>\n<li>All checkboxes and radio boxes will be deselected unless they have the checked attribute.<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> A reset button must be inside or attached to (via the form attribute) a element in order to have any e\ufb00ect. The button will only reset the elements within this form.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-hidden\">Hidden<\/h2>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"hidden\" name=\"inputName\" value=\"inputValue\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">A hidden input won&#8217;t be visible to the user, but its value will be sent to the server when the form is submitted nonetheless.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-tel\">Tel<\/h2>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"tel\" value=\"+8400000000\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">The input element with a type attribute whose value is tel represents a one-line plain-text edit control for entering a telephone number.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-email\">Email<\/h2>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<br \/>The <strong><em>&lt;input<\/em><\/strong> <em>type<\/em>=<em>&#8220;email&#8221;<\/em><strong><em>&gt;<\/em><\/strong> is used for input \ufb01elds that should contain an e-mail address.<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;form&gt;  \n&lt;label&gt;E-mail: &lt;label&gt;  \n&lt;input type=\"email\" name=\"email\"&gt; \n&lt;\/form&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">E-mail address can be automatically validated when submitted depending on browser support.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-number\">Number<\/h2>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"number\" value=\"0\" name=\"quantity\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">The Input element with a type attribute whose value is number represents a precise control for setting the element\u2019s value to a string representing a number.<\/p>\n\n<p class=\"wp-block-paragraph\">Please note that this \ufb01eld does not guarantee to have a correct number. It just allows all the symbols which could be used in any real number, for example user will be able to enter value like e1e-,0.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-range\">Range<\/h2>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"range\" min=\"\" max=\"\" step=\"\" \/&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">A control for entering a number whose exact value is not important.<\/p>\n\n<figure>\n<table>\n<tbody>\n<tr>\n<td><strong>Attribute<\/strong><\/td>\n<td><strong>Description<\/strong><\/td>\n<td><strong>Default value<\/strong><\/td>\n<\/tr>\n<tr>\n<td><em>min<\/em><\/td>\n<td>Minimum value for range<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td><em>max<\/em><\/td>\n<td>Maximum value for range<\/td>\n<td>100<\/td>\n<\/tr>\n<tr>\n<td><em>step<\/em><\/td>\n<td>Amount to increase by on each increment.<\/td>\n<td>1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n<h2 class=\"wp-block-heading\" id=\"h-search\">Search<\/h2>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<br \/>Input type search is used for textual search. It will add magni\ufb01er symbol next to space for text on most browsers<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"search\" name=\"googlesearch\"&gt;<\/pre>\n\n<h2 class=\"wp-block-heading\" id=\"h-image\">Image<\/h2>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"image\" src=\"img.png\" alt=\"image_name\" height=\"50px\" width=\"50px\"\/&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">An Image. You must use the src attribute to de\ufb01ne the source of the image and the alt attribute to de\ufb01ne<br \/>alternative text. You can use the height and width attributes to de\ufb01ne the size of the image in pixels.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-week\">Week<\/h2>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"week\" \/&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">Dependent on browser support, a control will show for entering a week-year number and a week number with no time zone.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-url\">Url<\/h2>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"url\" name=\"Homepage\"&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">This is used for input \ufb01elds that should contain a URL address.<br \/>Depending on browser support, the url \ufb01eld can be automatically validated when submitted.<br \/>Some smartphones recognize the url type, and adds &#8220;.com&#8221; to the keyboard to match url input.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-datetime-local\">DateTime-Local<\/h2>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"datetime-local\" \/&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">Dependent on browser support, a date and time picker will pop up on screen for you to choose a date and time.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-month\">Month<\/h2>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"month\" \/&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">Dependent on browser support, a control will show to pick the month.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-time\">Time<\/h2>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"time\" \/&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">The time input marks this element as accepting a string representing a time. The format is de\ufb01ned in <a href=\"https:\/\/tools.ietf.org\/html\/rfc3339\">RFC 3339<\/a> and should be a partial-time such as<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">19:04:39 \n08:20:39.04<\/pre>\n\n<p class=\"wp-block-paragraph\">Currently, all versions of Edge, Chrome, Opera, and Chrome for Android support type=&#8221;time&#8221;. The newer versions of Android Browser, speci\ufb01cally 4.4 and up support it. Safari for iOS o\ufb00ers partial support, not supporting min, max, and step attributes.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-datetime-global\">DateTime (Global)<\/h2>\n\n<p class=\"wp-block-paragraph\">The input element with a type attribute whose value is <strong>&#8220;datetime&#8221;<\/strong> represents a control for setting the element\u2019s value to a string representing a <strong>global date and time (with timezone information)<\/strong>.<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;fieldset&gt;   \n&lt;p&gt;&lt;label&gt;Meeting time: &lt;input type=datetime name=\"meeting.start\"&gt;&lt;\/label&gt; \n&lt;\/fieldset&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\"><em>Permitted attributes:<\/em><\/p>\n\n<ul class=\"wp-block-list\">\n<li><em>global attributes <\/em><\/li>\n<li><em>name <\/em><\/li>\n<li><em>disabled <\/em><\/li>\n<li><em>form <\/em><\/li>\n<li><em>type <\/em><\/li>\n<li><em>autocomplete <\/em><\/li>\n<li><em>autofocus <\/em><\/li>\n<li><em>list <\/em><\/li>\n<li><em>min &amp; max <\/em><\/li>\n<li><em>step (\ufb02oat) <\/em><\/li>\n<li><em>readonly <\/em><\/li>\n<li><em>required value<\/em><\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\" id=\"h-date\">Date<\/h2>\n\n<p class=\"wp-block-paragraph\">Version \u2265 5<\/p>\n\n<pre data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;input type=\"date\" \/&gt;<\/pre>\n\n<p class=\"wp-block-paragraph\">A date picker will pop up on screen for you to choose a date. This is not supported in Firefox or Internet Explorer.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Parameter Details class Indicates the Class of the input id ndicates the ID of the input type Identifies the type of input control to display. Acceptable values are hidden, text,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":526,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[73,76,111,77],"tags":[110,112,136,154,113],"class_list":["post-397","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css","category-html","category-html-5-notes-for-professional","category-javascript","tag-html-5-notes","tag-html-5-tutorial","tag-html-resources","tag-html-with-css","tag-html5"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Chapter 17: Input Control Elements - DigitalHubZ<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Chapter 17: Input Control Elements\" \/>\n<meta property=\"og:description\" content=\"Parameter Details class Indicates the Class of the input id ndicates the ID of the input type Identifies the type of input control to display. Acceptable values are hidden, text,&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/\" \/>\n<meta property=\"og:site_name\" content=\"DigitalHubZ\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-09T05:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T10:44:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.digitalhubz.com\/blog\/wp-content\/uploads\/2021\/07\/HTML-5-Notes-For-Professional-Chapter-17.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"945\" \/>\n\t<meta property=\"og:image:height\" content=\"394\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DigitalHubZ\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DigitalHubZ\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/\"},\"author\":{\"name\":\"DigitalHubZ\",\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/#\\\/schema\\\/person\\\/5a4074d837d6e5d22d665e5b7ca9e873\"},\"headline\":\"Chapter 17: Input Control Elements\",\"datePublished\":\"2021-07-09T05:00:00+00:00\",\"dateModified\":\"2026-02-26T10:44:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/\"},\"wordCount\":2730,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/HTML-5-Notes-For-Professional-Chapter-17.jpg\",\"keywords\":[\"HTML 5 Notes\",\"HTML 5 Tutorial\",\"HTML Resources\",\"HTML with CSS\",\"HTML5\"],\"articleSection\":[\"CSS\",\"HTML\",\"HTML 5 Notes For Professional\",\"Javascript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/\",\"url\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/\",\"name\":\"Chapter 17: Input Control Elements - DigitalHubZ\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/HTML-5-Notes-For-Professional-Chapter-17.jpg\",\"datePublished\":\"2021-07-09T05:00:00+00:00\",\"dateModified\":\"2026-02-26T10:44:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/HTML-5-Notes-For-Professional-Chapter-17.jpg\",\"contentUrl\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/HTML-5-Notes-For-Professional-Chapter-17.jpg\",\"width\":945,\"height\":394},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/chapter-17-input-control-elements\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chapter 17: Input Control Elements\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/\",\"name\":\"DigitalHubZ\",\"description\":\"Future-Ready Digital Solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/#organization\",\"name\":\"DigitalHubZ\",\"url\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/digitalhubz.webp\",\"contentUrl\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/digitalhubz.webp\",\"width\":1232,\"height\":369,\"caption\":\"DigitalHubZ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/#\\\/schema\\\/person\\\/5a4074d837d6e5d22d665e5b7ca9e873\",\"name\":\"DigitalHubZ\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/414c5bb85907e15e0f840541718ecc7420d52ea432b33f6a57761a674a52ebb7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/414c5bb85907e15e0f840541718ecc7420d52ea432b33f6a57761a674a52ebb7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/414c5bb85907e15e0f840541718ecc7420d52ea432b33f6a57761a674a52ebb7?s=96&d=mm&r=g\",\"caption\":\"DigitalHubZ\"},\"sameAs\":[\"https:\\\/\\\/digitalhubz.com\"],\"url\":\"https:\\\/\\\/www.digitalhubz.com\\\/blog\\\/author\\\/digi_v1_wp\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Chapter 17: Input Control Elements - DigitalHubZ","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/","og_locale":"en_US","og_type":"article","og_title":"Chapter 17: Input Control Elements","og_description":"Parameter Details class Indicates the Class of the input id ndicates the ID of the input type Identifies the type of input control to display. Acceptable values are hidden, text,&hellip;","og_url":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/","og_site_name":"DigitalHubZ","article_published_time":"2021-07-09T05:00:00+00:00","article_modified_time":"2026-02-26T10:44:28+00:00","og_image":[{"width":945,"height":394,"url":"https:\/\/www.digitalhubz.com\/blog\/wp-content\/uploads\/2021\/07\/HTML-5-Notes-For-Professional-Chapter-17.jpg","type":"image\/jpeg"}],"author":"DigitalHubZ","twitter_card":"summary_large_image","twitter_misc":{"Written by":"DigitalHubZ","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/#article","isPartOf":{"@id":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/"},"author":{"name":"DigitalHubZ","@id":"https:\/\/www.digitalhubz.com\/blog\/#\/schema\/person\/5a4074d837d6e5d22d665e5b7ca9e873"},"headline":"Chapter 17: Input Control Elements","datePublished":"2021-07-09T05:00:00+00:00","dateModified":"2026-02-26T10:44:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/"},"wordCount":2730,"commentCount":3,"publisher":{"@id":"https:\/\/www.digitalhubz.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/#primaryimage"},"thumbnailUrl":"https:\/\/www.digitalhubz.com\/blog\/wp-content\/uploads\/2021\/07\/HTML-5-Notes-For-Professional-Chapter-17.jpg","keywords":["HTML 5 Notes","HTML 5 Tutorial","HTML Resources","HTML with CSS","HTML5"],"articleSection":["CSS","HTML","HTML 5 Notes For Professional","Javascript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/","url":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/","name":"Chapter 17: Input Control Elements - DigitalHubZ","isPartOf":{"@id":"https:\/\/www.digitalhubz.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/#primaryimage"},"image":{"@id":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/#primaryimage"},"thumbnailUrl":"https:\/\/www.digitalhubz.com\/blog\/wp-content\/uploads\/2021\/07\/HTML-5-Notes-For-Professional-Chapter-17.jpg","datePublished":"2021-07-09T05:00:00+00:00","dateModified":"2026-02-26T10:44:28+00:00","breadcrumb":{"@id":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/#primaryimage","url":"https:\/\/www.digitalhubz.com\/blog\/wp-content\/uploads\/2021\/07\/HTML-5-Notes-For-Professional-Chapter-17.jpg","contentUrl":"https:\/\/www.digitalhubz.com\/blog\/wp-content\/uploads\/2021\/07\/HTML-5-Notes-For-Professional-Chapter-17.jpg","width":945,"height":394},{"@type":"BreadcrumbList","@id":"https:\/\/www.digitalhubz.com\/blog\/chapter-17-input-control-elements\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.digitalhubz.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Chapter 17: Input Control Elements"}]},{"@type":"WebSite","@id":"https:\/\/www.digitalhubz.com\/blog\/#website","url":"https:\/\/www.digitalhubz.com\/blog\/","name":"DigitalHubZ","description":"Future-Ready Digital Solutions","publisher":{"@id":"https:\/\/www.digitalhubz.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.digitalhubz.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.digitalhubz.com\/blog\/#organization","name":"DigitalHubZ","url":"https:\/\/www.digitalhubz.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.digitalhubz.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.digitalhubz.com\/blog\/wp-content\/uploads\/2023\/03\/digitalhubz.webp","contentUrl":"https:\/\/www.digitalhubz.com\/blog\/wp-content\/uploads\/2023\/03\/digitalhubz.webp","width":1232,"height":369,"caption":"DigitalHubZ"},"image":{"@id":"https:\/\/www.digitalhubz.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.digitalhubz.com\/blog\/#\/schema\/person\/5a4074d837d6e5d22d665e5b7ca9e873","name":"DigitalHubZ","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/414c5bb85907e15e0f840541718ecc7420d52ea432b33f6a57761a674a52ebb7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/414c5bb85907e15e0f840541718ecc7420d52ea432b33f6a57761a674a52ebb7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/414c5bb85907e15e0f840541718ecc7420d52ea432b33f6a57761a674a52ebb7?s=96&d=mm&r=g","caption":"DigitalHubZ"},"sameAs":["https:\/\/digitalhubz.com"],"url":"https:\/\/www.digitalhubz.com\/blog\/author\/digi_v1_wp\/"}]}},"_links":{"self":[{"href":"https:\/\/www.digitalhubz.com\/blog\/wp-json\/wp\/v2\/posts\/397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.digitalhubz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.digitalhubz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.digitalhubz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.digitalhubz.com\/blog\/wp-json\/wp\/v2\/comments?post=397"}],"version-history":[{"count":4,"href":"https:\/\/www.digitalhubz.com\/blog\/wp-json\/wp\/v2\/posts\/397\/revisions"}],"predecessor-version":[{"id":54808,"href":"https:\/\/www.digitalhubz.com\/blog\/wp-json\/wp\/v2\/posts\/397\/revisions\/54808"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.digitalhubz.com\/blog\/wp-json\/wp\/v2\/media\/526"}],"wp:attachment":[{"href":"https:\/\/www.digitalhubz.com\/blog\/wp-json\/wp\/v2\/media?parent=397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.digitalhubz.com\/blog\/wp-json\/wp\/v2\/categories?post=397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.digitalhubz.com\/blog\/wp-json\/wp\/v2\/tags?post=397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}