{"id":523,"date":"2025-05-19T11:11:51","date_gmt":"2025-05-19T11:11:51","guid":{"rendered":"https:\/\/buhave.com\/courses\/?p=523"},"modified":"2025-05-20T12:57:18","modified_gmt":"2025-05-20T12:57:18","slug":"forms-and-user-input","status":"publish","type":"post","link":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/","title":{"rendered":"Forms and User Input"},"content":{"rendered":"<h2>Introduction to &lt;form&gt; and attributes<\/h2>\n<p>The &lt;form&gt; element in HTML is used to collect user input and submit data to a server or process it with JavaScript. It\u2019s essential for creating interactive features like login pages, surveys, contact forms, and more.<\/p>\n<h3>What is a &lt;form&gt;?<\/h3>\n<p>The &lt;form&gt; tag defines an HTML form and acts as a container for different types of input controls: text fields, checkboxes, radio buttons, submit buttons, etc.<\/p>\n<p><strong>Basic Syntax:<\/strong><\/p>\n<p style=\"text-align: center\"><em>&lt;form action=&#8221;\/submit&#8221; method=&#8221;POST&#8221;&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;text&#8221; name=&#8221;username&#8221;&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;submit&#8221; value=&#8221;Submit&#8221;&gt;<\/em><br \/>\n<em>&lt;\/form&gt;<\/em><\/p>\n<p><strong>Common &lt;form&gt; Attributes<\/strong><\/p>\n<table border=\"1\">\n<thead>\n<tr>\n<th><strong>Attribute<\/strong><\/th>\n<th><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>action<\/td>\n<td>URL where the form data is sent (server endpoint).<\/td>\n<\/tr>\n<tr>\n<td>method<\/td>\n<td>HTTP method (GET or POST) used to submit the form.<\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>Used to identify the form (especially useful in JS).<\/td>\n<\/tr>\n<tr>\n<td>target<\/td>\n<td>Specifies where to display the response (_self, _blank, etc.).<\/td>\n<\/tr>\n<tr>\n<td>autocomplete<\/td>\n<td>Enables\/disables browser autofill (on or off).<\/td>\n<\/tr>\n<tr>\n<td>novalidate<\/td>\n<td>Prevents the browser from validating form inputs before submission.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Example with Attributes:<\/strong><\/p>\n<p style=\"text-align: center\"><em>&lt;form action=&#8221;submit.php&#8221; method=&#8221;POST&#8221; target=&#8221;_blank&#8221; autocomplete=&#8221;on&#8221;&gt;<\/em><br \/>\n<em>&lt;label for=&#8221;email&#8221;&gt;Email:&lt;\/label&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;email&#8221; id=&#8221;email&#8221; name=&#8221;email&#8221; required&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;submit&#8221; value=&#8221;Subscribe&#8221;&gt;<\/em><br \/>\n<em>&lt;\/form&gt;<\/em><\/p>\n<ul>\n<li>action: Points to submit.php.<\/li>\n<li>method: Sends data using POST (hidden from URL).<\/li>\n<li>target: Opens result in a new tab.<\/li>\n<li>autocomplete: Enables autofill for inputs.<\/li>\n<\/ul>\n<p><strong>Quick Notes:<\/strong><\/p>\n<ul>\n<li>Use POST when sending sensitive data (like passwords).<\/li>\n<li>GET is used for search forms or bookmarks (data appears in the URL).<\/li>\n<li>Combine &lt;form&gt; with proper input elements and validations for robust UX.<\/li>\n<\/ul>\n<h2>Input types: text, email, password, radio, checkbox, etc.<\/h2>\n<p>HTML\u2019s &lt;input&gt; element is used within &lt;form&gt; tags to collect various types of user input. Each type defines a specific behavior, UI, and validation rules.<\/p>\n<h3>1. type=&#8221;text&#8221;<\/h3>\n<p>Used for single-line plain text input.<\/p>\n<p style=\"text-align: center\"><em>&lt;label for=&#8221;name&#8221;&gt;Name:&lt;\/label&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;text&#8221; id=&#8221;name&#8221; name=&#8221;name&#8221;&gt;<\/em><\/p>\n<p>Accepts letters, numbers, and symbols.<\/p>\n<h3>2. type=&#8221;email&#8221;<\/h3>\n<p>Accepts email addresses; provides basic validation for format (e.g., @ symbol).<\/p>\n<p style=\"text-align: center\"><em>&lt;label for=&#8221;email&#8221;&gt;Email:&lt;\/label&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;email&#8221; id=&#8221;email&#8221; name=&#8221;email&#8221; required&gt;<\/em><\/p>\n<p>Built-in validation, helpful for user experience.<\/p>\n<h3>3. type=&#8221;password&#8221;<\/h3>\n<p>Hides user input, used for sensitive info like passwords.<\/p>\n<p style=\"text-align: center\"><em>&lt;label for=&#8221;pass&#8221;&gt;Password:&lt;\/label&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;password&#8221; id=&#8221;pass&#8221; name=&#8221;password&#8221;&gt;<\/em><\/p>\n<p>Input is masked (\u2022\u2022\u2022\u2022\u2022) by default.<\/p>\n<h3>4. type=&#8221;radio&#8221;<\/h3>\n<p>Lets users select one option from a set.<\/p>\n<p style=\"text-align: center\"><em>&lt;p&gt;Gender:&lt;\/p&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;radio&#8221; id=&#8221;male&#8221; name=&#8221;gender&#8221; value=&#8221;male&#8221;&gt;<\/em><br \/>\n<em>&lt;label for=&#8221;male&#8221;&gt;Male&lt;\/label&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;radio&#8221; id=&#8221;female&#8221; name=&#8221;gender&#8221; value=&#8221;female&#8221;&gt;<\/em><br \/>\n<em>&lt;label for=&#8221;female&#8221;&gt;Female&lt;\/label&gt;<\/em><\/p>\n<p>All radios with the same name act as a group.<\/p>\n<h3>5. type=&#8221;checkbox&#8221;<\/h3>\n<p>Used to select multiple options independently.<\/p>\n<p style=\"text-align: center\"><em>&lt;p&gt;Languages:&lt;\/p&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;checkbox&#8221; id=&#8221;python&#8221; name=&#8221;lang&#8221; value=&#8221;Python&#8221;&gt;<\/em><br \/>\n<em>&lt;label for=&#8221;python&#8221;&gt;Python&lt;\/label&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;checkbox&#8221; id=&#8221;js&#8221; name=&#8221;lang&#8221; value=&#8221;JavaScript&#8221;&gt;<\/em><br \/>\n<em>&lt;label for=&#8221;js&#8221;&gt;JavaScript&lt;\/label&gt;<\/em><\/p>\n<p>Each checkbox works independently.<\/p>\n<h3>6. type=&#8221;date&#8221;<\/h3>\n<p>Allows users to pick a date from a calendar UI.<\/p>\n<p style=\"text-align: center\"><em>&lt;label for=&#8221;dob&#8221;&gt;Date of Birth:&lt;\/label&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;date&#8221; id=&#8221;dob&#8221; name=&#8221;dob&#8221;&gt;<\/em><\/p>\n<h3>7. type=&#8221;number&#8221;<\/h3>\n<p>Restricts input to numeric values only.<\/p>\n<p style=\"text-align: center\"><em>&lt;label for=&#8221;age&#8221;&gt;Age:&lt;\/label&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;number&#8221; id=&#8221;age&#8221; name=&#8221;age&#8221; min=&#8221;0&#8243; max=&#8221;100&#8243;&gt;<\/em><\/p>\n<p>Supports min, max, and step.<\/p>\n<h3>8. type=&#8221;file&#8221;<\/h3>\n<p>Lets users upload files.<\/p>\n<p style=\"text-align: center\"><em>&lt;label for=&#8221;resume&#8221;&gt;Upload Resume:&lt;\/label&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;file&#8221; id=&#8221;resume&#8221; name=&#8221;resume&#8221;&gt;<\/em><\/p>\n<h3>9. type=&#8221;range&#8221;<\/h3>\n<p>Displays a slider for selecting a number within a range.<\/p>\n<p style=\"text-align: center\"><em>&lt;label for=&#8221;volume&#8221;&gt;Volume:&lt;\/label&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;range&#8221; id=&#8221;volume&#8221; name=&#8221;volume&#8221; min=&#8221;0&#8243; max=&#8221;100&#8243;&gt;<\/em><\/p>\n<h3>10. type=&#8221;submit&#8221; &amp; type=&#8221;reset&#8221;<\/h3>\n<ul>\n<li>submit sends the form data.<\/li>\n<li>reset clears all fields.<\/li>\n<\/ul>\n<p style=\"text-align: center\"><em>&lt;input type=&#8221;submit&#8221; value=&#8221;Send&#8221;&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;reset&#8221; value=&#8221;Clear&#8221;&gt;<\/em><\/p>\n<p><strong>Other Useful Input Types<\/strong><\/p>\n<table border=\"1\">\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>search<\/td>\n<td>Styled for search fields<\/td>\n<\/tr>\n<tr>\n<td>tel<\/td>\n<td>For phone number inputs<\/td>\n<\/tr>\n<tr>\n<td>url<\/td>\n<td>Validates web addresses<\/td>\n<\/tr>\n<tr>\n<td>color<\/td>\n<td>Color picker<\/td>\n<\/tr>\n<tr>\n<td>hidden<\/td>\n<td>Hidden fields (used in backend work)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Labels, textareas, selects, buttons<\/h2>\n<p>These HTML form elements are crucial for creating user-friendly, accessible, and interactive web forms. Below is a breakdown of each with examples and best practices.<\/p>\n<h3>1. &lt;label&gt; \u2013 Associating Text with Form Controls<\/h3>\n<p>The &lt;label&gt; tag improves accessibility and usability by linking text descriptions to form inputs.<\/p>\n<p><strong>Syntax:<\/strong><\/p>\n<p style=\"text-align: center\"><em>&lt;label for=&#8221;username&#8221;&gt;Username:&lt;\/label&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;text&#8221; id=&#8221;username&#8221; name=&#8221;username&#8221;&gt;<\/em><\/p>\n<ul>\n<li>The for attribute must match the input\u2019s id.<\/li>\n<li>Clicking the label focuses the input.<\/li>\n<\/ul>\n<h3>2. &lt;textarea&gt; \u2013 Multi-line Text Input<\/h3>\n<p>Used for collecting long-form input like messages or descriptions.<\/p>\n<p><strong>Syntax:<\/strong><\/p>\n<p style=\"text-align: center\"><em>&lt;label for=&#8221;message&#8221;&gt;Message:&lt;\/label&gt;&lt;br&gt;<\/em><br \/>\n<em>&lt;textarea id=&#8221;message&#8221; name=&#8221;message&#8221; rows=&#8221;5&#8243; cols=&#8221;40&#8243;&gt;Enter your message here&#8230;&lt;\/textarea&gt;<\/em><\/p>\n<p><strong>Attributes:<\/strong><\/p>\n<ul>\n<li>rows: Number of visible text lines.<\/li>\n<li>cols: Width of the textarea.<\/li>\n<li>Can include placeholder\/default text between opening and closing tags.<\/li>\n<\/ul>\n<h3>3. &lt;select&gt; \u2013 Dropdown Menus<\/h3>\n<p>Creates a dropdown list from which a user can select one or more options.<\/p>\n<p><strong>Syntax:<\/strong><\/p>\n<p style=\"text-align: center\"><em>&lt;label for=&#8221;country&#8221;&gt;Choose Country:&lt;\/label&gt;<\/em><br \/>\n<em>&lt;select id=&#8221;country&#8221; name=&#8221;country&#8221;&gt;<\/em><br \/>\n<em>&lt;option value=&#8221;us&#8221;&gt;USA&lt;\/option&gt;<\/em><br \/>\n<em>&lt;option value=&#8221;ca&#8221;&gt;Canada&lt;\/option&gt;<\/em><br \/>\n<em>&lt;option value=&#8221;uk&#8221;&gt;UK&lt;\/option&gt;<\/em><br \/>\n<em>&lt;\/select&gt;<\/em><\/p>\n<p><strong>Optional Attributes:<\/strong><\/p>\n<ul>\n<li>multiple: Allows selection of multiple options.<\/li>\n<li>size: Number of visible options before scrolling.<\/li>\n<\/ul>\n<h3>4. &lt;button&gt; \u2013 Clickable Button<\/h3>\n<p>Can be used to submit, reset, or trigger JavaScript actions.<\/p>\n<p><strong>Syntax:<\/strong><\/p>\n<p style=\"text-align: center\"><em>&lt;button type=&#8221;submit&#8221;&gt;Submit&lt;\/button&gt;<\/em><br \/>\n<em>&lt;button type=&#8221;reset&#8221;&gt;Clear&lt;\/button&gt;<\/em><br \/>\n<em>&lt;button type=&#8221;button&#8221; onclick=&#8221;alert(&#8216;Clicked!&#8217;)&#8221;&gt;Click Me&lt;\/button&gt;<\/em><\/p>\n<p><strong>Types:<\/strong><\/p>\n<ul>\n<li>submit: Submits the form.<\/li>\n<li>reset: Resets form fields to default values.<\/li>\n<li>button: Does nothing by default; used with JS.<\/li>\n<\/ul>\n<p><strong>Pro Tips:<\/strong><\/p>\n<ul>\n<li>Always pair inputs with &lt;label&gt; for accessibility (screen readers).<\/li>\n<li>Use textarea for longer user input like feedback or posts.<\/li>\n<li>Use &lt;select&gt; when users must choose from predefined options.<\/li>\n<li>Use &lt;button&gt; for actions and interactions beyond form submission.<\/li>\n<\/ul>\n<h2>Form submission methods: GET vs. POST<\/h2>\n<p>In HTML, the &lt;form&gt; tag uses the method attribute to define how form data is sent to a server. The two primary methods are GET and POST, and each serves different purposes with distinct characteristics.<\/p>\n<h3>method=&#8221;GET&#8221;<\/h3>\n<p>Sends form data appended to the URL as query parameters.<\/p>\n<p><strong>Example URL:<\/strong><\/p>\n<ul>\n<li>https:\/\/example.com\/search?query=python<\/li>\n<\/ul>\n<p><strong>Use Cases:<\/strong><\/p>\n<ul>\n<li>Search forms<\/li>\n<li>Bookmarkable or shareable results<\/li>\n<li>Non-sensitive data<\/li>\n<\/ul>\n<p><strong>Characteristics:<\/strong><\/p>\n<table border=\"1\">\n<thead>\n<tr>\n<th>Feature<\/th>\n<th>GET<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Data visible in URL<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Data length limit<\/td>\n<td>Yes (URL limit ~2000 chars)<\/td>\n<\/tr>\n<tr>\n<td>Caching allowed<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Bookmarkable<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Secure for sensitive data<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Default form method<\/td>\n<td>Yes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Example:<\/strong><\/p>\n<p style=\"text-align: center\"><em>&lt;form action=&#8221;\/search&#8221; method=&#8221;GET&#8221;&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;text&#8221; name=&#8221;query&#8221;&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;submit&#8221; value=&#8221;Search&#8221;&gt;<\/em><br \/>\n<em>&lt;\/form&gt;<\/em><\/p>\n<h3>method=&#8221;POST&#8221;<\/h3>\n<ul>\n<li>Sends form data in the body of the HTTP request.<\/li>\n<li>The URL stays clean and does not expose form values.<\/li>\n<\/ul>\n<p><strong>Use Cases:<\/strong><\/p>\n<ul>\n<li>Login forms<\/li>\n<li>Registration forms<\/li>\n<li>File uploads<\/li>\n<li>Sensitive or large data<\/li>\n<\/ul>\n<p><strong>Characteristics:<\/strong><\/p>\n<table border=\"1\">\n<thead>\n<tr>\n<th><strong>Feature<\/strong><\/th>\n<th><strong>POST<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Data visible in URL<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Data length limit<\/td>\n<td>Very high<\/td>\n<\/tr>\n<tr>\n<td>Caching allowed<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Bookmarkable<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Secure for sensitive data<\/td>\n<td>Yes (with HTTPS)<\/td>\n<\/tr>\n<tr>\n<td>Default method<\/td>\n<td>No (must specify)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Example:<\/strong><\/p>\n<p style=\"text-align: center\"><em>&lt;form action=&#8221;\/submit-form&#8221; method=&#8221;POST&#8221;&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;text&#8221; name=&#8221;name&#8221;&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;email&#8221; name=&#8221;email&#8221;&gt;<\/em><br \/>\n<em>&lt;input type=&#8221;submit&#8221; value=&#8221;Submit&#8221;&gt;<\/em><br \/>\n<em>&lt;\/form&gt;<\/em><\/p>\n<p><strong>Summary Table:<\/strong><\/p>\n<table border=\"1\">\n<thead>\n<tr>\n<th><strong>Feature<\/strong><\/th>\n<th><strong>GET<\/strong><\/th>\n<th><strong>POST<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Data in URL<\/td>\n<td>Yes<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Use for sensitive data<\/td>\n<td>No<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Bookmarkable<\/td>\n<td>Yes<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Caching<\/td>\n<td>Yes<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Max data size<\/td>\n<td>Limited (URL length)<\/td>\n<td>Large<\/td>\n<\/tr>\n<tr>\n<td>Default method<\/td>\n<td>Yes<\/td>\n<td>No (must specify)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Pro Tip:<\/strong> Always use POST when handling sensitive data like passwords, personal info, or uploading files, especially when using HTTPS for secure transmission.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction to &lt;form&gt; and attributes The &lt;form&gt; element in HTML is used to collect user input and submit data to a server or process it with JavaScript. It\u2019s essential for creating interactive features like login pages, surveys, contact forms, and more. What is a &lt;form&gt;?<\/p>\n","protected":false},"author":1,"featured_media":524,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-523","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Forms and User Input - HTML Course<\/title>\n<meta name=\"description\" content=\"Forms and user input enable structured data collection from users through interactive fields, controls, validation, and submission methods.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Forms and User Input - HTML Course\" \/>\n<meta property=\"og:description\" content=\"Forms and user input enable structured data collection from users through interactive fields, controls, validation, and submission methods.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/\" \/>\n<meta property=\"og:site_name\" content=\"BUHAVE\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BeYouHave\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/naveedsafdarawan\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-19T11:11:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-20T12:57:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/Forms-and-User-Input.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Naveed Safdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Naveed Safdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/\"},\"author\":{\"name\":\"Naveed Safdar\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#\\\/schema\\\/person\\\/04fe0254e118521c9fbb3da39de5acca\"},\"headline\":\"Forms and User Input\",\"datePublished\":\"2025-05-19T11:11:51+00:00\",\"dateModified\":\"2025-05-20T12:57:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/\"},\"wordCount\":1356,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/Forms-and-User-Input.webp\",\"articleSection\":[\"HTML Course\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/\",\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/\",\"name\":\"Forms and User Input - HTML Course\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/Forms-and-User-Input.webp\",\"datePublished\":\"2025-05-19T11:11:51+00:00\",\"dateModified\":\"2025-05-20T12:57:18+00:00\",\"description\":\"Forms and user input enable structured data collection from users through interactive fields, controls, validation, and submission methods.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/#primaryimage\",\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/Forms-and-User-Input.webp\",\"contentUrl\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/Forms-and-User-Input.webp\",\"width\":1200,\"height\":628,\"caption\":\"Forms and User Input\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/html\\\/forms-and-user-input\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Courses\",\"item\":\"https:\\\/\\\/buhave.com\\\/courses\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML Course\",\"item\":\"https:\\\/\\\/buhave.com\\\/courses\\\/learn\\\/html\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Forms and User Input\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#website\",\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/\",\"name\":\"BUHAVE\",\"description\":\"Courses - Learn Online for Free\",\"publisher\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/buhave.com\\\/courses\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#organization\",\"name\":\"BUHAVE\",\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/buhave-course.webp\",\"contentUrl\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/buhave-course.webp\",\"width\":375,\"height\":75,\"caption\":\"BUHAVE\"},\"image\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/BeYouHave\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/buhave\",\"https:\\\/\\\/www.youtube.com\\\/@buhave\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#\\\/schema\\\/person\\\/04fe0254e118521c9fbb3da39de5acca\",\"name\":\"Naveed Safdar\",\"description\":\"I\u2019m Naveed Safdar - SEO Manager with over 10 years of experience in SEO and Digital Marketing. I\u2019ve had the privilege of working with leading national and international companies including Grafdom, PakWheels, Systems Limited, Confiz, Educative, and Dubizzle Labs. My expertise spans technical SEO, content strategy, organic growth, and performance analytics - helping businesses improve visibility, traffic, and ROI.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/naveedsafdar\\\/\",\"https:\\\/\\\/www.facebook.com\\\/naveedsafdarawan\\\/\",\"https:\\\/\\\/www.youtube.com\\\/@naveedsafdar\"],\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/author\\\/naveed-safdar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Forms and User Input - HTML Course","description":"Forms and user input enable structured data collection from users through interactive fields, controls, validation, and submission methods.","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:\/\/buhave.com\/courses\/html\/forms-and-user-input\/","og_locale":"en_US","og_type":"article","og_title":"Forms and User Input - HTML Course","og_description":"Forms and user input enable structured data collection from users through interactive fields, controls, validation, and submission methods.","og_url":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/","og_site_name":"BUHAVE","article_publisher":"https:\/\/www.facebook.com\/BeYouHave\/","article_author":"https:\/\/www.facebook.com\/naveedsafdarawan\/","article_published_time":"2025-05-19T11:11:51+00:00","article_modified_time":"2025-05-20T12:57:18+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/Forms-and-User-Input.webp","type":"image\/webp"}],"author":"Naveed Safdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Naveed Safdar","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/#article","isPartOf":{"@id":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/"},"author":{"name":"Naveed Safdar","@id":"https:\/\/buhave.com\/courses\/#\/schema\/person\/04fe0254e118521c9fbb3da39de5acca"},"headline":"Forms and User Input","datePublished":"2025-05-19T11:11:51+00:00","dateModified":"2025-05-20T12:57:18+00:00","mainEntityOfPage":{"@id":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/"},"wordCount":1356,"commentCount":0,"publisher":{"@id":"https:\/\/buhave.com\/courses\/#organization"},"image":{"@id":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/#primaryimage"},"thumbnailUrl":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/Forms-and-User-Input.webp","articleSection":["HTML Course"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/","url":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/","name":"Forms and User Input - HTML Course","isPartOf":{"@id":"https:\/\/buhave.com\/courses\/#website"},"primaryImageOfPage":{"@id":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/#primaryimage"},"image":{"@id":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/#primaryimage"},"thumbnailUrl":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/Forms-and-User-Input.webp","datePublished":"2025-05-19T11:11:51+00:00","dateModified":"2025-05-20T12:57:18+00:00","description":"Forms and user input enable structured data collection from users through interactive fields, controls, validation, and submission methods.","breadcrumb":{"@id":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/#primaryimage","url":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/Forms-and-User-Input.webp","contentUrl":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/Forms-and-User-Input.webp","width":1200,"height":628,"caption":"Forms and User Input"},{"@type":"BreadcrumbList","@id":"https:\/\/buhave.com\/courses\/html\/forms-and-user-input\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Courses","item":"https:\/\/buhave.com\/courses\/"},{"@type":"ListItem","position":2,"name":"HTML Course","item":"https:\/\/buhave.com\/courses\/learn\/html\/"},{"@type":"ListItem","position":3,"name":"Forms and User Input"}]},{"@type":"WebSite","@id":"https:\/\/buhave.com\/courses\/#website","url":"https:\/\/buhave.com\/courses\/","name":"BUHAVE","description":"Courses - Learn Online for Free","publisher":{"@id":"https:\/\/buhave.com\/courses\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/buhave.com\/courses\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/buhave.com\/courses\/#organization","name":"BUHAVE","url":"https:\/\/buhave.com\/courses\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/buhave.com\/courses\/#\/schema\/logo\/image\/","url":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/03\/buhave-course.webp","contentUrl":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/03\/buhave-course.webp","width":375,"height":75,"caption":"BUHAVE"},"image":{"@id":"https:\/\/buhave.com\/courses\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/BeYouHave\/","https:\/\/www.linkedin.com\/company\/buhave","https:\/\/www.youtube.com\/@buhave"]},{"@type":"Person","@id":"https:\/\/buhave.com\/courses\/#\/schema\/person\/04fe0254e118521c9fbb3da39de5acca","name":"Naveed Safdar","description":"I\u2019m Naveed Safdar - SEO Manager with over 10 years of experience in SEO and Digital Marketing. I\u2019ve had the privilege of working with leading national and international companies including Grafdom, PakWheels, Systems Limited, Confiz, Educative, and Dubizzle Labs. My expertise spans technical SEO, content strategy, organic growth, and performance analytics - helping businesses improve visibility, traffic, and ROI.","sameAs":["https:\/\/www.linkedin.com\/in\/naveedsafdar\/","https:\/\/www.facebook.com\/naveedsafdarawan\/","https:\/\/www.youtube.com\/@naveedsafdar"],"url":"https:\/\/buhave.com\/courses\/author\/naveed-safdar\/"}]}},"_links":{"self":[{"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/posts\/523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/comments?post=523"}],"version-history":[{"count":1,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/posts\/523\/revisions"}],"predecessor-version":[{"id":525,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/posts\/523\/revisions\/525"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/media\/524"}],"wp:attachment":[{"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/media?parent=523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/categories?post=523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/tags?post=523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}