{"id":198,"date":"2026-01-17T16:13:37","date_gmt":"2026-01-17T21:13:37","guid":{"rendered":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/?post_type=chapter&#038;p=198"},"modified":"2026-02-18T13:42:15","modified_gmt":"2026-02-18T18:42:15","slug":"chapter-12-forms","status":"publish","type":"chapter","link":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/chapter\/chapter-12-forms\/","title":{"raw":"Chapter 12 \u2022 Forms","rendered":"Chapter 12 \u2022 Forms"},"content":{"raw":"HTML forms provide a way for readers to submit information about themselves and what they are interested in. Forms can be useful for readers to contact you.\r\n\r\nFollowing is a description of some of the most useful form tags. To see the tags in action, visit the GRC 365 \"Demo Site\" document, \"<a href=\"https:\/\/r3adams.github.io\/grc-365-new\/contact.html\" target=\"_blank\" rel=\"noopener\">Contact<\/a>.\" You can read the underlying code with your browser's Web Inspector.\r\n\r\nA more thorough explanation of forms and their tags is given on the <a href=\"https:\/\/www.w3schools.com\/tags\/tag_form.asp\" target=\"_blank\" rel=\"noopener\">W3Schools<\/a> website.\r\n\r\n<a href=\"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-content\/uploads\/sites\/449\/2026\/01\/Fig10-01_Form.jpg\"><img src=\"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-content\/uploads\/sites\/449\/2026\/01\/Fig10-01_Form.jpg\" alt=\"\" width=\"768\" height=\"695\" class=\"aligncenter wp-image-201\" \/><\/a>\r\n<h2>Form Elements<\/h2>\r\n<h4>Form Tag<\/h4>\r\nThe form tag (opening\/closing) provides a framework for the form. The opening form tag should have an \"action\" section and a \"post\" method. The action is what takes place when the reader hits the Submit button. Collecting form data requires a program and database on the server hosting the form page. Several free services are available that collect form data and email it to the host, including web3forms.com and formsubmit.co.\r\n<h4>Input Tag<\/h4>\r\nThe input tag (self-closing) should have an associated type, which can include \"text\" for single lines of text; \"radio\" for radio buttons, in which readers can only select one alternative; \"checkbox\" for check boxes, of which the readers can select multiple alternatives; and the \"submit\" button.\r\n<h4>Textarea Tag<\/h4>\r\nThe &lt;textarea&gt; tag (opening\/closing) is for multiple lines of text, such as a description or message from a reader. The dimensions of the textarea can be specified in rows and columns or as dimensions.\r\n<h4>Select Tag<\/h4>\r\nThe &lt;select&gt; tag (opening\/closing) creates a dropdown menu of &lt;option&gt; tags.\r\n<h2>Accessory Tags<\/h2>\r\nThe following tags are useful in organizing other tags and groups thereof:\r\n\r\n\u2022 &lt;label&gt; (opening\/closing) \u2014 provides a description of the field\r\n\r\n\u2022 &lt;fieldset&gt; (opening\/closing) \u2014 draws a box around a group of tags\r\n<h2>Design Ideas for Forms<\/h2>\r\nSome styles that can make forms more attractive, reader-friendly, and functional include:\r\n\r\n\u2022 center the form in the page (the &lt;form&gt; tag is block-level and can be centered with margin: 0 auto)\r\n\r\n\u2022 color the background of the form\r\n\r\n\u2022 round the corners of the form","rendered":"<p>HTML forms provide a way for readers to submit information about themselves and what they are interested in. Forms can be useful for readers to contact you.<\/p>\n<p>Following is a description of some of the most useful form tags. To see the tags in action, visit the GRC 365 &#8220;Demo Site&#8221; document, &#8220;<a href=\"https:\/\/r3adams.github.io\/grc-365-new\/contact.html\" target=\"_blank\" rel=\"noopener\">Contact<\/a>.&#8221; You can read the underlying code with your browser&#8217;s Web Inspector.<\/p>\n<p>A more thorough explanation of forms and their tags is given on the <a href=\"https:\/\/www.w3schools.com\/tags\/tag_form.asp\" target=\"_blank\" rel=\"noopener\">W3Schools<\/a> website.<\/p>\n<p><a href=\"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-content\/uploads\/sites\/449\/2026\/01\/Fig10-01_Form.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-content\/uploads\/sites\/449\/2026\/01\/Fig10-01_Form.jpg\" alt=\"\" width=\"768\" height=\"695\" class=\"aligncenter wp-image-201\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-content\/uploads\/sites\/449\/2026\/01\/Fig10-01_Form.jpg 1172w, https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-content\/uploads\/sites\/449\/2026\/01\/Fig10-01_Form-300x271.jpg 300w, https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-content\/uploads\/sites\/449\/2026\/01\/Fig10-01_Form-1024x926.jpg 1024w, https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-content\/uploads\/sites\/449\/2026\/01\/Fig10-01_Form-768x695.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-content\/uploads\/sites\/449\/2026\/01\/Fig10-01_Form-65x59.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-content\/uploads\/sites\/449\/2026\/01\/Fig10-01_Form-225x203.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-content\/uploads\/sites\/449\/2026\/01\/Fig10-01_Form-350x317.jpg 350w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/p>\n<h2>Form Elements<\/h2>\n<h4>Form Tag<\/h4>\n<p>The form tag (opening\/closing) provides a framework for the form. The opening form tag should have an &#8220;action&#8221; section and a &#8220;post&#8221; method. The action is what takes place when the reader hits the Submit button. Collecting form data requires a program and database on the server hosting the form page. Several free services are available that collect form data and email it to the host, including web3forms.com and formsubmit.co.<\/p>\n<h4>Input Tag<\/h4>\n<p>The input tag (self-closing) should have an associated type, which can include &#8220;text&#8221; for single lines of text; &#8220;radio&#8221; for radio buttons, in which readers can only select one alternative; &#8220;checkbox&#8221; for check boxes, of which the readers can select multiple alternatives; and the &#8220;submit&#8221; button.<\/p>\n<h4>Textarea Tag<\/h4>\n<p>The &lt;textarea&gt; tag (opening\/closing) is for multiple lines of text, such as a description or message from a reader. The dimensions of the textarea can be specified in rows and columns or as dimensions.<\/p>\n<h4>Select Tag<\/h4>\n<p>The &lt;select&gt; tag (opening\/closing) creates a dropdown menu of &lt;option&gt; tags.<\/p>\n<h2>Accessory Tags<\/h2>\n<p>The following tags are useful in organizing other tags and groups thereof:<\/p>\n<p>\u2022 &lt;label&gt; (opening\/closing) \u2014 provides a description of the field<\/p>\n<p>\u2022 &lt;fieldset&gt; (opening\/closing) \u2014 draws a box around a group of tags<\/p>\n<h2>Design Ideas for Forms<\/h2>\n<p>Some styles that can make forms more attractive, reader-friendly, and functional include:<\/p>\n<p>\u2022 center the form in the page (the &lt;form&gt; tag is block-level and can be centered with margin: 0 auto)<\/p>\n<p>\u2022 color the background of the form<\/p>\n<p>\u2022 round the corners of the form<\/p>\n","protected":false},"author":6,"menu_order":12,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-198","chapter","type-chapter","status-publish","hentry"],"part":3,"_links":{"self":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/pressbooks\/v2\/chapters\/198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/wp\/v2\/users\/6"}],"version-history":[{"count":7,"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/pressbooks\/v2\/chapters\/198\/revisions"}],"predecessor-version":[{"id":244,"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/pressbooks\/v2\/chapters\/198\/revisions\/244"}],"part":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/pressbooks\/v2\/chapters\/198\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/wp\/v2\/media?parent=198"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/pressbooks\/v2\/chapter-type?post=198"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/wp\/v2\/contributor?post=198"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/webdesign2\/wp-json\/wp\/v2\/license?post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}