{"id":120,"date":"2026-04-10T08:58:56","date_gmt":"2026-04-10T08:58:56","guid":{"rendered":"https:\/\/gigz.pk\/html\/?post_type=lesson&#038;p=120"},"modified":"2026-04-27T14:28:12","modified_gmt":"2026-04-27T14:28:12","slug":"form-basics","status":"publish","type":"lesson","link":"https:\/\/gigz.pk\/html\/index.php\/lesson\/form-basics\/","title":{"rendered":"Form Basics"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">HTML forms are used to collect user input on a website. They allow users to enter information like name, email, password, and other details.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What is a Form<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A form in HTML is created using the <code>&lt;form&gt;<\/code> tag. It is used to send data to a server for processing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Basic Structure of a Form<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The form contains different input elements like text boxes, buttons, and dropdowns.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example of a Basic Form<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;form&gt; &lt;input type=&#8221;text&#8221; placeholder=&#8221;Enter Name&#8221;&gt; &lt;input type=&#8221;submit&#8221; value=&#8221;Submit&#8221;&gt; &lt;\/form&gt;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Form Tag<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>&lt;form&gt;<\/code> tag defines the start and end of a form. All input fields are placed inside it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Input Tag<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>&lt;input&gt;<\/code> tag is used to create different types of input fields such as text, email, password, and more.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Submit Button<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The submit button is used to send form data to the server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example of Submit Button<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;input type=&#8221;submit&#8221; value=&#8221;Submit&#8221;&gt;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Action Attribute<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The action attribute defines where the form data will be sent.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Method Attribute<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The method attribute defines how data will be sent, usually using GET or POST.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Summary<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">HTML forms are used to collect user data. They are created using the <code>&lt;form&gt;<\/code> tag and include input fields and a submit button for sending information.<\/p>\n\n\n<div class=\"yoast-breadcrumbs\"><span><span><a href=\"https:\/\/gigz.pk\/html\/\">Home<\/a><\/span> \u00bb <span class=\"breadcrumb_last\" aria-current=\"page\">HTML Intermediate > Forms &#038; User Input > Form Basics<\/span><\/span><\/div>\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1777300046944\"><strong class=\"schema-faq-question\"><\/strong> <p class=\"schema-faq-answer\"><\/p> <\/div> <\/div>\n","protected":false},"menu_order":31,"template":"","class_list":["post-120","lesson","type-lesson","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Form Basics - HTML learning mastery<\/title>\n<meta name=\"description\" content=\"Learn HTML forms to collect user input. Use form, input, and submit button with action and method for data handling.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gigz.pk\/html\/index.php\/lesson\/form-basics\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Form Basics - HTML learning mastery\" \/>\n<meta property=\"og:description\" content=\"Learn HTML forms to collect user input. Use form, input, and submit button with action and method for data handling.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gigz.pk\/html\/index.php\/lesson\/form-basics\/\" \/>\n<meta property=\"og:site_name\" content=\"HTML learning mastery\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-27T14:28:12+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/gigz.pk\\\/html\\\/index.php\\\/lesson\\\/form-basics\\\/\",\"url\":\"https:\\\/\\\/gigz.pk\\\/html\\\/index.php\\\/lesson\\\/form-basics\\\/\",\"name\":\"Form Basics - HTML learning mastery\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/html\\\/#website\"},\"datePublished\":\"2026-04-10T08:58:56+00:00\",\"dateModified\":\"2026-04-27T14:28:12+00:00\",\"description\":\"Learn HTML forms to collect user input. Use form, input, and submit button with action and method for data handling.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/html\\\/index.php\\\/lesson\\\/form-basics\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gigz.pk\\\/html\\\/index.php\\\/lesson\\\/form-basics\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/html\\\/index.php\\\/lesson\\\/form-basics\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gigz.pk\\\/html\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML Intermediate > Forms & User Input > Form Basics\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/html\\\/#website\",\"url\":\"https:\\\/\\\/gigz.pk\\\/html\\\/\",\"name\":\"HTML learning mastery\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gigz.pk\\\/html\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Form Basics - HTML learning mastery","description":"Learn HTML forms to collect user input. Use form, input, and submit button with action and method for data handling.","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:\/\/gigz.pk\/html\/index.php\/lesson\/form-basics\/","og_locale":"en_US","og_type":"article","og_title":"Form Basics - HTML learning mastery","og_description":"Learn HTML forms to collect user input. Use form, input, and submit button with action and method for data handling.","og_url":"https:\/\/gigz.pk\/html\/index.php\/lesson\/form-basics\/","og_site_name":"HTML learning mastery","article_modified_time":"2026-04-27T14:28:12+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["WebPage","FAQPage"],"@id":"https:\/\/gigz.pk\/html\/index.php\/lesson\/form-basics\/","url":"https:\/\/gigz.pk\/html\/index.php\/lesson\/form-basics\/","name":"Form Basics - HTML learning mastery","isPartOf":{"@id":"https:\/\/gigz.pk\/html\/#website"},"datePublished":"2026-04-10T08:58:56+00:00","dateModified":"2026-04-27T14:28:12+00:00","description":"Learn HTML forms to collect user input. Use form, input, and submit button with action and method for data handling.","breadcrumb":{"@id":"https:\/\/gigz.pk\/html\/index.php\/lesson\/form-basics\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gigz.pk\/html\/index.php\/lesson\/form-basics\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gigz.pk\/html\/index.php\/lesson\/form-basics\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gigz.pk\/html\/"},{"@type":"ListItem","position":2,"name":"HTML Intermediate > Forms & User Input > Form Basics"}]},{"@type":"WebSite","@id":"https:\/\/gigz.pk\/html\/#website","url":"https:\/\/gigz.pk\/html\/","name":"HTML learning mastery","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gigz.pk\/html\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/gigz.pk\/html\/index.php\/wp-json\/wp\/v2\/lesson\/120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gigz.pk\/html\/index.php\/wp-json\/wp\/v2\/lesson"}],"about":[{"href":"https:\/\/gigz.pk\/html\/index.php\/wp-json\/wp\/v2\/types\/lesson"}],"wp:attachment":[{"href":"https:\/\/gigz.pk\/html\/index.php\/wp-json\/wp\/v2\/media?parent=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}