{"id":386,"date":"2011-10-28T15:39:12","date_gmt":"2011-10-28T15:39:12","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=386"},"modified":"2011-10-28T15:39:12","modified_gmt":"2011-10-28T15:39:12","slug":"html-5-input-types","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/html-5-input-types\/","title":{"rendered":"New HTML 5 input types &#8211; use them!"},"content":{"rendered":"<p>HTML 5 brings new input types to supplement the standard <em>text<\/em> input. Notably:<\/p>\n<ul>\n<li>email<\/li>\n<li>url<\/li>\n<li>number<\/li>\n<li>range<\/li>\n<li>date<\/li>\n<li>search<\/li>\n<li>color<\/li>\n<\/ul>\n<p>If you&#39;ve dabbled with these input types, you may initially see no value in them. But, here are a few reasons to get comfortable with them and start using them consistently in your web development:<\/p>\n<ol>\n<li><strong>Why not!<\/strong> The don&#39;t cause any compatibility issues. If an older browser doesn&#39;t recognize the input type, it will default to <em>text<\/em>.<\/li>\n<li><strong>Validation.<\/strong> Some browsers will force validation on certain input types, such as <em>email<\/em>.<\/li>\n<li><strong>Mobile Support.<\/strong> Mobile phones such as the iPhone offer alternative keyboards or widgets depending on the input type. For instance, if iPhone recognizes a <em>number<\/em> input, it will switch to the numeric keyboard.<\/li>\n<\/ol>\n<p>There are many resources out there that explain these new <a href=\"http:\/\/www.w3schools.com\/html5\/html5_form_input_types.asp\">HTML 5 input types<\/a> in depth.<\/p>\n<p>Code Example:<\/p>\n<p><code>&lt;input type=&quot;email&quot; name=&quot;contact_email&quot; id=&quot;contact_email&quot; \/&gt;<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>HTML 5 brings new input types to supplement the standard text input. Notably: email url number range date search color If you&#39;ve dabbled with these&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[14,132],"tags":[53],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/386"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=386"}],"version-history":[{"count":1,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/386\/revisions"}],"predecessor-version":[{"id":387,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/386\/revisions\/387"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}