{"id":3971,"date":"2015-04-29T12:15:58","date_gmt":"2015-04-29T09:15:58","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=3971"},"modified":"2017-12-19T14:04:33","modified_gmt":"2017-12-19T12:04:33","slug":"html5-contact-form-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/","title":{"rendered":"HTML5 Contact Form Example"},"content":{"rendered":"<p>In this example we will go through a simple clean contact form.<\/p>\n<p>Contact forms are sections within a webpage that you add with a set of input fields for users to have the possibility to contact the website admins.<\/p>\n<p>Normally, you can choose how many fields you want the contact form to have, like name, e-mail, subject and message, or more if you need.<\/p>\n<p>You can also choose different types of field align like inline or block, according to the layout of your website and space available.<\/p>\n<p>This is how our final contact form is going to look like:<br \/>\n<figure id=\"attachment_3982\" aria-describedby=\"caption-attachment-3982\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form1.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form1.jpg\" alt=\"Final View of the Contact Form\" width=\"800\" height=\"320\" class=\"size-full wp-image-3982\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form1.jpg 800w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form1-300x120.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-3982\" class=\"wp-caption-text\">Final View of the Contact Form<\/figcaption><\/figure><br \/>\n[ulp id=&#8217;tgm4cmEWcKUikZNn&#8217;]<\/p>\n<h2>1. Basic Setup <\/h2>\n<p>Go ahead and create a new <code>html<\/code> file with the basic syntax inside like below:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;HTML5 Contact Form&lt;\/title&gt;\r\n\t&lt;link rel=\"stylesheet\" href=\"css\/font-awesome.min.css\"&gt;  &lt;!-- link FontAwesome --&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n\t&lt;!-- STYLE SECTION --&gt;\r\n\r\n\t&lt;style type=\"text\/css\"&gt;\r\n\r\n  \t&lt;\/style&gt;\r\n\r\n\r\n\t&lt;!-- HTML SECTION --&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>Add <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/font-awesome.zip\">these<\/a> two FontAwesome folders inside your project folder (we&#8217;ll need font icons):<br \/>\n<figure id=\"attachment_3987\" aria-describedby=\"caption-attachment-3987\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form2.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form2.jpg\" alt=\"Inside your Project Folder\" width=\"800\" height=\"200\" class=\"size-full wp-image-3987\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form2.jpg 800w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form2-300x75.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-3987\" class=\"wp-caption-text\">Inside your Project Folder<\/figcaption><\/figure><br \/>\nNotice that I have <strong>already linked FontAwesome<\/strong> css file in the <code>head<\/code> section of the basic html.<\/p>\n<h2>2. Step by Step &#8211; Contact Form <\/h2>\n<p>Now let&#8217;s code the contact form step by step and see how we can make it better and better.<\/p>\n<h3>2.1 Coding the HTML <\/h3>\n<p>In the html code section we will have the following components:<\/p>\n<p><strong>1.<\/strong> A <code>form<\/code> tag &#8211; this will wrap all input\/textarea fields. Give it a class of <code>form<\/code>, a <code>method<\/code> and an <code>action<\/code>.<\/p>\n<p><strong>2.<\/strong> Three <code>div<\/code> tags &#8211; these divs will wrap inputs and fonticons, each div is going to have a class of <code>wrapper<\/code>.<\/p>\n<p>&nbsp; &nbsp; 2.1 &#8211; Inputs with a <code>class<\/code>, <code>type<\/code>, <code>name<\/code> and <code>placeholder<\/code>. The class is going to be <code>input-group<\/code> for all of them.<\/p>\n<p>&nbsp; &nbsp; 2.2 &#8211; Icons inside <code>i<\/code> tags and with respective classes according to the fonticon being used.<\/p>\n<p><strong>3.<\/strong> A <code>textarea<\/code> element &#8211; it will be needed for the message section. It will have a class of <code>textarea<\/code> and a placeholder.<\/p>\n<p><strong>4.<\/strong> A <code>button<\/code> element &#8211; it will send\/post the data to the destination. It will have a class of <code>send-btn<\/code> and a href.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION --&gt;\r\n\r\n&lt;form class=\"form\" action=\"\/post\" method=\"post\"&gt;\r\n\r\n&lt;h2&gt;Contact Form&lt;\/h2&gt;   &lt;!-- just a title --&gt;\r\n\r\n\t  &lt;div class=\"wrapper\"&gt;\r\n   &lt;i class=\"fa fa-user\"&gt;&lt;\/i&gt; \t\t &lt;!-- user icon for name field --&gt;\r\n   &lt;input class=\"input-group\" type=\"password\" name=\"name\" placeholder=\"Name (required)\"&gt;&lt;\/div&gt;\r\n       &lt;div class=\"wrapper\"&gt;\r\n   &lt;i class=\"fa fa-envelope-o\"&gt;&lt;\/i&gt;\t&lt;!-- envelope icon for email field --&gt;\r\n   &lt;input class=\"input-group\" type=\"text\" name='email' placeholder=\"E-Mail (required)\"&gt;&lt;\/div&gt;\r\n\t   &lt;div class=\"wrapper\"&gt;\r\n   &lt;i class=\"fa fa-file-text-o\"&gt;&lt;\/i&gt;\t&lt;!-- file text icon for subject field --&gt;\r\n   &lt;input class=\"input-group\" type=\"text\" name='subject' placeholder=\"Subject (optional)\"&gt;&lt;\/div&gt;\r\n\r\n\t&lt;textarea class=\"textarea\" placeholder=\"Write your message here...\" &gt;&lt;\/textarea&gt;\r\n\r\n   &lt;button href=\"#\" class=\"send-btn\"&gt;Send&lt;\/button&gt;\r\n&lt;\/form&gt;\r\n<\/pre>\n<p>For now, because only the html section has been coded, you will get a really creepy view of the form like this:<br \/>\n<figure id=\"attachment_4015\" aria-describedby=\"caption-attachment-4015\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form7.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form7.jpg\" alt=\"HTML Form Coding\" width=\"800\" height=\"215\" class=\"size-full wp-image-4015\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form7.jpg 800w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form7-300x81.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-4015\" class=\"wp-caption-text\">HTML Form Coding<\/figcaption><\/figure><\/p>\n<h3>2.2 Styling with CSS <\/h3>\n<p>This is where the form gets a makeup and becomes in a final state for the website. <\/p>\n<p>First, we are going to refer to the <code>.input-group<\/code> class to style the input fields.<\/p>\n<p>Look at the code below:<\/p>\n<pre class=\"brush:css\">\r\n.input-group {\r\n\twidth: 15em;\r\n\theight: 2.5em;\r\n\tmargin-bottom: 1.8em;            \/* some space below other field *\/\r\n\tmargin-right: 1.7em;             \/* some space from the next field *\/\r\n\tpadding-left: 2.5em;             \/* space from left to accommodate icons *\/\r\n\tborder: 0.1em solid #ccc;        \/* light gray border applied *\/\r\n\tborder-radius: 0.3em;            \/* small border radius *\/\r\n\tbackground-color: #ffffea;       \/* light yellow field background color *\/\r\n\t}\r\n<\/pre>\n<p>Up until now, the three input fields we have styled will look like this:<br \/>\n<figure id=\"attachment_4006\" aria-describedby=\"caption-attachment-4006\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form4.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form4.jpg\" alt=\"Input Fields Styling\" width=\"800\" height=\"200\" class=\"size-full wp-image-4006\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form4.jpg 800w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form4-300x75.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-4006\" class=\"wp-caption-text\">Input Fields Styling<\/figcaption><\/figure><\/p>\n<p>Now lets work with the .wrapper and <code>.wrapper<\/code> <code>.fa classes<\/code> to make icons sit inside the fields.<\/p>\n<p>By giving these classes relative and absolute positioning in the page, we will be able to stick the fonticons inside the inputs.<br \/>\nThis is very tricky and hard to achieve in forms, so look carefully at the code below:<\/p>\n<pre class=\"brush:css\">\r\n.wrapper {\r\n\tposition: relative;\r\n\tdisplay: inline;       \/* displays the three input fields in the same row *\/\r\n}\r\n\r\n.wrapper .fa {\r\n\tposition: absolute;\r\n\tpadding: 0.4em;      \/* sat the icons with a right spacing referring to the border *\/\r\n\tfont-size: 1.2em;   \/* chose a suitable font size according to the size of the field *\/\r\n\tcolor: #ccc;       \/* gave icons a light gray color *\/\r\n}\r\n<\/pre>\n<p>Done this kind of icon positioning and styling, we&#8217;d get the following vieW:<br \/>\n<figure id=\"attachment_4009\" aria-describedby=\"caption-attachment-4009\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form5.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form5.jpg\" alt=\"Styling the Wrapper and Icons\" width=\"800\" height=\"210\" class=\"size-full wp-image-4009\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form5.jpg 800w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form5-300x79.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-4009\" class=\"wp-caption-text\">Styling the Wrapper and Icons<\/figcaption><\/figure><br \/>\nNow you understand better why we needed all that left padding when styling the input fields.<\/p>\n<p>It&#8217;s time to style the <code>textarea<\/code> element. This element will sit below the input fields.<\/p>\n<pre class=\"brush:css\">\r\n.textarea {\r\n\twidth: 54em;          \/* initial width *\/\r\n\tmax-width: 54em;      \/* maximum width *\/\r\n\theight: 10em;         \/* initial height *\/\r\n\tdisplay: block;       \/* show below input fields *\/\r\n\tpadding: 1.5em;       \/* sit text\/placeholder with some edges padding *\/\r\n\tborder: 0.1em solid #ccc;  \/* same border style as the input fields *\/\r\n\tborder-radius: 0.3em;      \/* same border radius as the input fields *\/\r\n\tbackground-color: #ffffea; \/* same background color as the input fields *\/\r\n}\r\n<\/pre>\n<p>The textarea will be resizable by height but not by width as that looked better to me.<\/p>\n<p>I have also given these fields simple <code>hover<\/code> and <code>active<\/code> states like below:<\/p>\n<pre class=\"brush:css\">\r\n.input-group:hover {\r\n\tborder-color: #3399FF;\r\n\tbox-shadow: 0em 0em 0.2em #3399FF;\r\n}\r\n\r\n.input-group:active {\r\n\tborder-color: #006699;\r\n}\r\n\r\n.textarea:hover {\r\n\tborder-color: #3399FF;\r\n\tbox-shadow: 0em 0em 0.2em #3399FF;\r\n}\r\n\r\n.textarea:active {\r\n\tborder-color: #006699;\r\n}\r\n<\/pre>\n<p>In the image below, the message field is in <code>hover<\/code> state:<br \/>\n<figure id=\"attachment_4012\" aria-describedby=\"caption-attachment-4012\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form6.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form6.jpg\" alt=\"Contact Form - All Elements Styled\" width=\"800\" height=\"331\" class=\"size-full wp-image-4012\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form6.jpg 800w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form6-300x124.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-4012\" class=\"wp-caption-text\">Contact Form &#8211; All Elements Styled<\/figcaption><\/figure><\/p>\n<p>The last element we need to style is the button:<\/p>\n<pre class=\"brush:css\">\r\n.send-btn {\r\n\tpadding: 0.5em 4em;\r\n\tfont-size: 1em;\r\n\tmargin-top: 2em;\r\n\tbackground-color: #319cd5;\r\n\tcolor: white;\r\n\tborder: none;\r\n\tborder-radius: 0.3em;\r\n\tmargin-left: 37em;   \/* this value depends from page to page *\/\r\n}\r\n<\/pre>\n<p>And the final view of the form would be:<br \/>\n<figure id=\"attachment_4018\" aria-describedby=\"caption-attachment-4018\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form8.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form8.jpg\" alt=\"Final Form View\" width=\"800\" height=\"405\" class=\"size-full wp-image-4018\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form8.jpg 800w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/form8-300x152.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-4018\" class=\"wp-caption-text\">Final Form View<\/figcaption><\/figure><\/p>\n<h2>3. Conclusion <\/h2>\n<p>To conclude, we can say that there are a lot of ways you can code a contact form and it is pretty simple.<\/p>\n<p>However, do consider design elements like spacing, colors and icons when creating a form to make them more usable.<\/p>\n<p>Feel free to create forms both from scratch or using css frameworks to help you get through this.<\/p>\n<p>This was just a nice example of how you can do it yourseld in minutes.<\/p>\n<h2>4. Download <\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/HTML5-Contact-Form-Example.zip\"><strong>HTML5 Contact Form Example<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this example we will go through a simple clean contact form. Contact forms are sections within a webpage that you add with a set of input fields for users to have the possibility to contact the website admins. Normally, you can choose how many fields you want the contact form to have, like name, &hellip;<\/p>\n","protected":false},"author":75,"featured_media":914,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-3971","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html5"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>HTML5 Contact Form Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"In this example we will go through a simple clean contact form. Contact forms are sections within a webpage that you add with a set of input fields for\" \/>\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.webcodegeeks.com\/html5\/html5-contact-form-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML5 Contact Form Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"In this example we will go through a simple clean contact form. Contact forms are sections within a webpage that you add with a set of input fields for\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fabiocimo\" \/>\n<meta property=\"article:published_time\" content=\"2015-04-29T09:15:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-19T12:04:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fabio Cimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fabiocimo\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabio Cimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/\"},\"author\":{\"name\":\"Fabio Cimo\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\"},\"headline\":\"HTML5 Contact Form Example\",\"datePublished\":\"2015-04-29T09:15:58+00:00\",\"dateModified\":\"2017-12-19T12:04:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/\"},\"wordCount\":706,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"articleSection\":[\"HTML5\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/\",\"name\":\"HTML5 Contact Form Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"datePublished\":\"2015-04-29T09:15:58+00:00\",\"dateModified\":\"2017-12-19T12:04:33+00:00\",\"description\":\"In this example we will go through a simple clean contact form. Contact forms are sections within a webpage that you add with a set of input fields for\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML5\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/html5\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"HTML5 Contact Form Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\",\"name\":\"Fabio Cimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"caption\":\"Fabio Cimo\"},\"description\":\"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.\",\"sameAs\":[\"https:\/\/www.facebook.com\/fabiocimo\",\"https:\/\/al.linkedin.com\/in\/fabiocimo\",\"https:\/\/x.com\/fabiocimo\",\"https:\/\/www.youtube.com\/fabiocimo1\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML5 Contact Form Example - Web Code Geeks - 2026","description":"In this example we will go through a simple clean contact form. Contact forms are sections within a webpage that you add with a set of input fields for","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.webcodegeeks.com\/html5\/html5-contact-form-example\/","og_locale":"en_US","og_type":"article","og_title":"HTML5 Contact Form Example - Web Code Geeks - 2026","og_description":"In this example we will go through a simple clean contact form. Contact forms are sections within a webpage that you add with a set of input fields for","og_url":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/fabiocimo","article_published_time":"2015-04-29T09:15:58+00:00","article_modified_time":"2017-12-19T12:04:33+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","type":"image\/jpeg"}],"author":"Fabio Cimo","twitter_card":"summary_large_image","twitter_creator":"@fabiocimo","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Fabio Cimo","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/"},"author":{"name":"Fabio Cimo","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22"},"headline":"HTML5 Contact Form Example","datePublished":"2015-04-29T09:15:58+00:00","dateModified":"2017-12-19T12:04:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/"},"wordCount":706,"commentCount":2,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","articleSection":["HTML5"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/","url":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/","name":"HTML5 Contact Form Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","datePublished":"2015-04-29T09:15:58+00:00","dateModified":"2017-12-19T12:04:33+00:00","description":"In this example we will go through a simple clean contact form. Contact forms are sections within a webpage that you add with a set of input fields for","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contact-form-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"HTML5","item":"https:\/\/www.webcodegeeks.com\/category\/html5\/"},{"@type":"ListItem","position":3,"name":"HTML5 Contact Form Example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22","name":"Fabio Cimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","caption":"Fabio Cimo"},"description":"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.","sameAs":["https:\/\/www.facebook.com\/fabiocimo","https:\/\/al.linkedin.com\/in\/fabiocimo","https:\/\/x.com\/fabiocimo","https:\/\/www.youtube.com\/fabiocimo1"],"url":"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/3971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=3971"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/3971\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/914"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=3971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=3971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=3971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}