{"id":110803,"date":"2021-02-25T16:33:59","date_gmt":"2021-02-25T11:03:59","guid":{"rendered":"https:\/\/www.vskills.in\/certification\/tutorial\/?page_id=110803"},"modified":"2024-04-12T14:31:16","modified_gmt":"2024-04-12T09:01:16","slug":"text-input-control-3","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/","title":{"rendered":"Text Input Control"},"content":{"rendered":"\n<p>Three types of text input are present in HTML single-line text boxes which are also called as text fields, password input and multiple-line text areas.<\/p>\n\n\n\n<p><strong>Single-Line Text Fields<\/strong><\/p>\n\n\n\n<p>It is the basic type of text input control and is a blank space, resembling a box, which can have only a single line of text. Usually, they are preceded by description detailing what to enter in the box as shown<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>HTML code<\/strong> &lt;form action=\u201c\/process.php\u201d method=\u201cget\u201d&gt; First name: &lt;input type=&#8221;text&#8221; \/&gt;&lt;br \/&gt; Last name: &lt;input type=&#8221;text&#8221; \/&gt; &lt;\/form&gt;<\/td><td><strong>Browser output<\/strong> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control.png\" alt=\"Text Input Control\" width=\"224\" height=\"54\">&nbsp; &nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Usually text fields used in web pages are single-line white spaces that appear slightly indented in the page. The size attribute specifies the amount of characters in text field control and their default value usually is 20 characters. But, it depends on the font size of the browser as text may appear larger or smaller.<\/p>\n\n\n\n<p>Attributes for Text Fields are<\/p>\n\n\n\n<p><strong>name<\/strong> &#8211; It identifies the control for correct processing and data transfer. It isn\u2019t displayed when the form is viewed in browser. It should be unique and is case-sensitive.<\/p>\n\n\n\n<p><strong>size<\/strong> It specifies the length of the text field in characters and value is a number.<\/p>\n\n\n\n<p><strong>maxlength<\/strong> \u2013 It specifies the maximum number of characters that can be entered in the text field by the user and value is a number.<\/p>\n\n\n\n<p><strong>value<\/strong> It defines what text, if any, should be present within the text field when it\u2019s initially displayed on the page.<\/p>\n\n\n\n<p>A sample form with input text controls and its attributes is shown<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>HTML code<\/strong> &lt;form action=\u201c\/process.php\u201d method=\u201cget\u201d&gt; &lt;input type=&#8221;text&#8221; name=&#8221;FirstName&#8221; value=&#8221;Enter First Name&#8221; \/&gt;&lt;br \/&gt; &lt;input type=&#8221;text&#8221; name=&#8221;LastName&#8221; value=&#8221;Enter Last Name&#8221; size=&#8221;20&#8243;\/&gt; &lt;\/form&gt;<\/td><td><strong>Browser output<\/strong> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control-2.png\" alt=\"Text Input Control 2\" width=\"155\" height=\"56\">&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>When the web page is viewed, user can erase the phrase before entering information.<\/p>\n\n\n\n<p><strong>Password Text Fields<\/strong><\/p>\n\n\n\n<p>It is similar to the regular text field but is exclusively used to input passwords as the text entered in it is shown as bullets instead of plain text. It is a form of single-line text input control created using an &lt;input&gt; element whose type attribute has a value of password as shown<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>HTML code<\/strong> &lt;form action=\u201c\/process.php\u201d method=\u201cget\u201d&gt; Username: &lt;input type=&#8221;text&#8221; name=&#8221;UserName&#8221;&gt;&lt;br \/&gt; Password: &lt;input type=&#8221;password&#8221; name=&#8221;Password&#8221;&gt; &lt;\/form&gt;<\/td><td><strong>Browser output<\/strong> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control-3.png\" alt=\"Text Input Control 3\" width=\"220\" height=\"56\">&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This input control prevents others to look over the user\u2019s password. The actual password is not encrypted.<\/p>\n\n\n\n<p><strong>Multiple-Line Text Areas<\/strong><\/p>\n\n\n\n<p>It uses &lt;textarea&gt; tag to input more than a single line of text from users. To specify the size of the text area, the tag uses the cols and rows attributes<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cols attribute specify width of text area, based on an average character width.<\/li>\n\n\n\n<li>Rows attribute specify height of text area, based on the number of text lines.<\/li>\n<\/ul>\n\n\n\n<p>Both the attributes relate to character width in browser hence, size of the text area may vary. Scroll bars appear if data beyond the visible text area is entered.<\/p>\n\n\n\n<p>Value attribute is not used in this tag but to include any text on initial loading of control, that text is put in opening and closing &lt;textarea&gt; tags as shown.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>HTML code<\/strong> &lt;form action=\u201c\/process.php\u201d method=\u201cget\u201d&gt; Share your opinions.&lt;br \/&gt; &lt;textarea name=&#8221;Opinions&#8221;&gt;Type here.&lt;\/textarea&gt; &lt;\/form&gt;<\/td><td><strong>Browser output<\/strong> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control-4.png\" alt=\"Text Input Control 4\" width=\"192\" height=\"80\">&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Another sample of the tag with attributes is shown<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>HTML code<\/strong> &lt;form action=\u201c\/process.php\u201d method=\u201cget\u201d&gt; Share your opinions.&lt;br \/&gt; &lt;textarea name=&#8221;Comments&#8221; cols=&#8221;30&#8243; rows=&#8221;5&#8243;&gt;Type here.&lt;\/textarea&gt; &lt;\/form&gt;<\/td><td><strong>Browser output<\/strong> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control-5.png\" alt=\"Text Input Control 5\" width=\"270\" height=\"125\">&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Apply for HTML Certification<\/strong><\/h3>\n\n\n\n<p><a href=\"https:\/\/www.vskills.in\/certification\/certified-html-designer\">https:\/\/www.vskills.in\/certification\/certified-html-designer<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong><a href=\"https:\/\/www.vskills.in\/certification\/certified-html-designer\" target=\"_blank\" rel=\"noreferrer noopener\">Back to Tutorials<\/a><\/strong><\/h4>\n","protected":false},"excerpt":{"rendered":"<p>Three types of text input are present in HTML single-line text boxes which are also called as text fields, password input and multiple-line text areas. Single-Line Text Fields It is the basic type of text input control and is a blank space, resembling a box, which can have only a single line of text. Usually,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-110803","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Text Input Control - Tutorial<\/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.vskills.in\/certification\/tutorial\/text-input-control-3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Text Input Control - Tutorial\" \/>\n<meta property=\"og:description\" content=\"Three types of text input are present in HTML single-line text boxes which are also called as text fields, password input and multiple-line text areas. Single-Line Text Fields It is the basic type of text input control and is a blank space, resembling a box, which can have only a single line of text. Usually,...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vskills.in\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-12T09:01:16+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control.png\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/\",\"name\":\"Text Input Control - Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control.png\",\"datePublished\":\"2021-02-25T11:03:59+00:00\",\"dateModified\":\"2024-04-12T09:01:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/#primaryimage\",\"url\":\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control.png\",\"contentUrl\":\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Text Input Control\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"name\":\"Tutorial\",\"description\":\"Vskills - A initiative in elearning and certification\",\"publisher\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\",\"name\":\"Vskills\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"contentUrl\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"width\":73,\"height\":55,\"caption\":\"Vskills\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vskills.in\/\",\"https:\/\/x.com\/vskills_in\",\"https:\/\/www.linkedin.com\/company-beta\/1371554\/\",\"https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Text Input Control - Tutorial","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.vskills.in\/certification\/tutorial\/text-input-control-3\/","og_locale":"en_US","og_type":"article","og_title":"Text Input Control - Tutorial","og_description":"Three types of text input are present in HTML single-line text boxes which are also called as text fields, password input and multiple-line text areas. Single-Line Text Fields It is the basic type of text input control and is a blank space, resembling a box, which can have only a single line of text. Usually,...","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T09:01:16+00:00","og_image":[{"url":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control.png","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/","name":"Text Input Control - Tutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/#primaryimage"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/#primaryimage"},"thumbnailUrl":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control.png","datePublished":"2021-02-25T11:03:59+00:00","dateModified":"2024-04-12T09:01:16+00:00","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/#primaryimage","url":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control.png","contentUrl":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/Text-Input-Control.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/text-input-control-3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Text Input Control"}]},{"@type":"WebSite","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","name":"Tutorial","description":"Vskills - A initiative in elearning and certification","publisher":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization","name":"Vskills","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","contentUrl":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","width":73,"height":55,"caption":"Vskills"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vskills.in\/","https:\/\/x.com\/vskills_in","https:\/\/www.linkedin.com\/company-beta\/1371554\/","https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw"]}]}},"_links":{"self":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/110803","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/comments?post=110803"}],"version-history":[{"count":3,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/110803\/revisions"}],"predecessor-version":[{"id":126971,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/110803\/revisions\/126971"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=110803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=110803"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=110803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}