{"id":4766,"date":"2015-06-05T12:15:40","date_gmt":"2015-06-05T09:15:40","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=4766"},"modified":"2018-01-08T14:38:22","modified_gmt":"2018-01-08T12:38:22","slug":"css-input-type-text-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/","title":{"rendered":"CSS Input Type Text Example"},"content":{"rendered":"<p>In this example, we&#8217;ll have a look at how we can style text inputs.<\/p>\n<p>Text inputs are very common in websites nowadays like in sign up forms, contact forms, search boxes, survey answers and so on.<\/p>\n<p>But you notice most of them are not styled, and you can see a bunch of text fields with the same default view accross different pages.<\/p>\n<p>Well, the <code>input type text<\/code> already has a default\/pre-styled view, but most of the times, you will be willing to change it.<\/p>\n<p>As always, lets first look at the basics and then some custom stuff.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n[ulp id=&#8217;nAkUl5IbAjqlXSla&#8217;]<\/p>\n<h2>1. Prerequisites<\/h2>\n<p>First, go ahead and create a html file with its basic syntax inside like this:<\/p>\n<pre class=\"brush:xml\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;CSS3 Text Input Styling Example&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;!-- STYLE  SECTION --&gt;\r\n&lt;style type=\"text\/css\"&gt;\r\n\r\n&lt;\/style&gt;\r\n\r\n&lt;!-- HTML SECTION  --&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n&lt;\/pre&gt;\r\n<\/pre>\n<p>Set up an input with a type of text, a class of element and optionally a name of city:<\/p>\n<pre class=\"brush:xml\">&lt;!-- HTML SECTION  --&gt;\r\n\t\r\n&lt;input type=\"text\" class=\"element\" name=\"city\"&gt;\r\n<\/pre>\n<p>Note that the name will be needed because the text input is going to be used under some form and referred to.<\/p>\n<p>Look at the default styling of a text input:<\/p>\n<pre class=\"brush:css\">input[type=text] {\r\n  background-color: #ffffff;\r\n  border: 1px solid #cccccc;\r\n  -webkit-border-radius: 3px;\r\n     -moz-border-radius: 3px;\r\n          border-radius: 3px;\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\r\n  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;\r\n     -moz-transition: border linear 0.2s, box-shadow linear 0.2s;\r\n      -ms-transition: border linear 0.2s, box-shadow linear 0.2s;\r\n       -o-transition: border linear 0.2s, box-shadow linear 0.2s;\r\n          transition: border linear 0.2s, box-shadow linear 0.2s;\r\n}\r\n\r\ninput[type=text]:focus {\r\n  border-color: rgba(82, 168, 236, 0.8);\r\n  outline: 0;\r\n  outline: thin dotted \\9;\r\n  \/* IE6-9 *\/\r\n\r\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);\r\n     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);\r\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);\r\n}\r\n<\/pre>\n<p>And the default view of a text input as you might know is:<\/p>\n<figure id=\"attachment_4780\" aria-describedby=\"caption-attachment-4780\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input1.jpg\"><img decoding=\"async\" class=\"size-full wp-image-4780\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input1.jpg\" alt=\"Text Input Default Style\" width=\"820\" height=\"117\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input1.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input1-300x43.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-4780\" class=\"wp-caption-text\">Text Input Default Style<\/figcaption><\/figure>\n<h2>2. Styling a Text Input<\/h2>\n<p>In this section, we will style the above element with CSS3 to create a better looking input view. Look at the lines below:<\/p>\n<pre class=\"brush:css\">&lt;style type=\"text\/css\"&gt;\r\n\r\n.element {\r\n\tfont-family: \"Montserrat\", sans-serif;\t\/* custom font applied *\/\r\n\twidth: 20em;\t\t\t\t\t\t\t\/* custom width *\/\r\n\theight: 3em;\t\t\t\t\t\t\t\/* custom height *\/\r\n\tborder: 0.1em solid #ccc;\t\t\t\t\/* custom border *\/\r\n\tborder-radius: 0.5em;\t\t\t\t\t\/* added border radius *\/\r\n\tbackground-color: #feffdc;\t\t\t\t\/* light yellow background *\/\r\n\tpadding: 0em 1em;\t\t\t\t\t\t\/* right and left padding *\/\r\n}\r\n\r\n&lt;\/style&gt;\r\n\r\n<\/pre>\n<p>Let&#8217;s have a look at what we styled:<\/p>\n<p>1. Broder &#8211; you will probably need a custom border for your input because the default one is really old inset shadow.<\/p>\n<p>2. Border-Radius &#8211; most text inputs on pages have this non-zero radius on their borders, it makes them look better.<\/p>\n<p>3. Background-Color &#8211; you may optionally use a bg color just to emphasize the input field, it is eye catching after all.<\/p>\n<p>4. Padding &#8211; use paddings\u00a0when width and height are changed and the text seems creepy\u00a0starting from the very beginning.<\/p>\n<p>We&#8217;ve pretty much given custom attributes to most of the properties. This would look like this:<\/p>\n<figure id=\"attachment_4784\" aria-describedby=\"caption-attachment-4784\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input2.jpg\"><img decoding=\"async\" class=\"size-full wp-image-4784\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input2.jpg\" alt=\"Custom Styled Text Input\" width=\"820\" height=\"217\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input2.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input2-300x79.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-4784\" class=\"wp-caption-text\">Custom Styled Text Input<\/figcaption><\/figure>\n<p>Now lets see another styling of the input text.<\/p>\n<pre class=\"brush:css\">&lt;style type=\"text\/css\"&gt;\r\n\r\n.element {\r\n\tfont-family: \"Montserrat\", sans-serif;\r\n\twidth: 30em;\r\n\theight: 4em;\r\n\tborder: 0.1em solid #ccc;\r\n\tborder-radius: 0.5em;\r\n\tbackground-color: #efefef;\r\n\tpadding: 0em 1em;\r\n\tfont-size: 1.2em;\r\n\tbox-shadow: 0em 0.1em 0.5em #ccc;\r\n}\r\n\r\n&lt;\/style&gt;\r\n<\/pre>\n<p>In this second example, we did some noticeable changes to the input:<\/p>\n<p>1. We are having a much larger input box which can be considered as comfortable for full page forms.<\/p>\n<p>2. We added a box-shadow which gave our inputs a 3D-like view which made it more attractive.<\/p>\n<p>3. Basically, you can change the bg color to whatever suits your needs according to your page design.<\/p>\n<p>4. Remember to always use custom fonts and font-sizes to adjust the right properties of the input.<\/p>\n<p>Have a look at what this looks like in the browser:<\/p>\n<figure id=\"attachment_4786\" aria-describedby=\"caption-attachment-4786\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input3.jpg\"><img decoding=\"async\" class=\"size-full wp-image-4786\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input3.jpg\" alt=\"Another Styling for the Text Input\" width=\"820\" height=\"367\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input3.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input3-300x134.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-4786\" class=\"wp-caption-text\">Another Styling for the Text Input<\/figcaption><\/figure>\n<p>See how in the second example we added a box-shadow property on the input and that made it look more professional.<\/p>\n<h2>3. Advanced Input Styling<\/h2>\n<p>Notice that up until now, we have been styling the text input by giving it a class ( <code>element<\/code> ), but what if you want to style<\/p>\n<p>all text inputs the same way? Well, there is a way. You can select all input type text like this in css: <code>input[type=text]<\/code>.<\/p>\n<p>First lets add a few more lines create a form like view of the inputs and then apply styling using the selector.<\/p>\n<pre class=\"brush:xml\">&lt;!-- HTML SECTION  --&gt;\r\n&lt;h4&gt;Please, fill the form below to continue:&lt;\/h4&gt;\r\n&lt;form class=\"form-group\" method=\"post\"&gt;\r\n\t&lt;h4&gt;First Name&lt;\/h4&gt;\r\n\t&lt;input type=\"text\" placeholder=\"First Name\" name=\"first-name\"&gt;&lt;br \/&gt;\r\n\t&lt;h4&gt;Last Name&lt;\/h4&gt;\r\n\t&lt;input type=\"text\" placeholder=\"Last Name\" name=\"last-name\"&gt;&lt;br \/&gt;\r\n\t&lt;h4&gt;E-Mail&lt;\/h4&gt;\r\n\t&lt;input type=\"text\" placeholder=\"E-Mail Address\" name=\"email\"&gt;&lt;br \/&gt;\r\n\t&lt;h4&gt;Country&lt;\/h4&gt;\r\n\t&lt;input type=\"text\" placeholder=\"Country\" name=\"country\"&gt;&lt;br \/&gt;\r\n&lt;\/form&gt;\r\n<\/pre>\n<p>That gave a form view of several inputs. A more intense styling with advanced shadows and inset would be:<\/p>\n<pre class=\"brush:css\">&lt;!-- STYLE  SECTION --&gt;\r\n\r\n&lt;style type=\"text\/css\"&gt;\r\n\r\ninput[type=text] {\r\n\tfont-family: \"Open Sans\", sans-serif;\r\n\twidth: 20em;\r\n\theight: 2em;\r\n\tborder: 0.1em solid #ccc;\r\n\tborder-radius: 0.2em;\r\n\tbackground-color: #f9f9f9;\r\n\tpadding: 0em 1em;\r\n\tfont-size: 1em;\r\n\r\n\tborder: 5px solid white; \r\n    -webkit-box-shadow: \r\n      inset 0 0 8px  rgba(0,0,0,0.1),\r\n            0 0 16px rgba(0,0,0,0.1); \r\n    -moz-box-shadow: \r\n      inset 0 0 8px  rgba(0,0,0,0.1),\r\n            0 0 16px rgba(0,0,0,0.1); \r\n    box-shadow: \r\n      inset 0 0 8px  rgba(0,0,0,0.1),\r\n            0 0 16px rgba(0,0,0,0.1); \r\n    padding: 15px;\r\n    background: rgba(255,255,255,0.5);\r\n    margin: 0 0 10px 0;\r\n}\r\n\r\nh4 {\r\n\tmargin-bottom: 0em;\r\n\tpadding-bottom: 0.5em;\r\n\tfont-family: \"Montserrat\";\r\n}\r\n<\/pre>\n<p>The new, smart styled all inputs would look like this:<\/p>\n<figure id=\"attachment_4794\" aria-describedby=\"caption-attachment-4794\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input4.jpg\"><img decoding=\"async\" class=\"size-full wp-image-4794\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input4.jpg\" alt=\"Styling all inputs with a type of Text using the CSS Selector\" width=\"820\" height=\"617\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input4.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/input4-300x226.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-4794\" class=\"wp-caption-text\">Styling all inputs with a type of Text using the CSS Selector<\/figcaption><\/figure>\n<h2>4. Conclusion<\/h2>\n<p>To conclude, there is a lot to explore while styling inputs of every type, especially text, and it is recommended to giveyour inputs a personalized view and keep a standard style that you create for later uses, just like we did with text inputs.<\/p>\n<p>The default input view is kinda creepy and old-fashioned, so consider using your own styling when using inputs.<\/p>\n<p>You could also take advantage of front end frameworks like Bootstrap to have pre styled inputs with nice animated hovers.<\/p>\n<h2>5. 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\/05\/CSS3-Text-Input-Styling.zip\"><strong>CSS3 Text Input Styling<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this example, we&#8217;ll have a look at how we can style text inputs. Text inputs are very common in websites nowadays like in sign up forms, contact forms, search boxes, survey answers and so on. But you notice most of them are not styled, and you can see a bunch of text fields with &hellip;<\/p>\n","protected":false},"author":75,"featured_media":917,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-4766","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CSS Input Type Text Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"In this example, we&#039;ll have a look at how we can style text inputs. Text inputs are very common in websites nowadays like in sign up forms, contact forms,\" \/>\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\/css\/css-input-type-text-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CSS Input Type Text Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"In this example, we&#039;ll have a look at how we can style text inputs. Text inputs are very common in websites nowadays like in sign up forms, contact forms,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-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-06-05T09:15:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-08T12:38:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-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\/css\/css-input-type-text-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/\"},\"author\":{\"name\":\"Fabio Cimo\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\"},\"headline\":\"CSS Input Type Text Example\",\"datePublished\":\"2015-06-05T09:15:40+00:00\",\"dateModified\":\"2018-01-08T12:38:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/\"},\"wordCount\":694,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"articleSection\":[\"CSS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/\",\"name\":\"CSS Input Type Text Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"datePublished\":\"2015-06-05T09:15:40+00:00\",\"dateModified\":\"2018-01-08T12:38:22+00:00\",\"description\":\"In this example, we'll have a look at how we can style text inputs. Text inputs are very common in websites nowadays like in sign up forms, contact forms,\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CSS\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/css\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"CSS Input Type Text 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":"CSS Input Type Text Example - Web Code Geeks - 2026","description":"In this example, we'll have a look at how we can style text inputs. Text inputs are very common in websites nowadays like in sign up forms, contact forms,","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\/css\/css-input-type-text-example\/","og_locale":"en_US","og_type":"article","og_title":"CSS Input Type Text Example - Web Code Geeks - 2026","og_description":"In this example, we'll have a look at how we can style text inputs. Text inputs are very common in websites nowadays like in sign up forms, contact forms,","og_url":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-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-06-05T09:15:40+00:00","article_modified_time":"2018-01-08T12:38:22+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-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\/css\/css-input-type-text-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/"},"author":{"name":"Fabio Cimo","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22"},"headline":"CSS Input Type Text Example","datePublished":"2015-06-05T09:15:40+00:00","dateModified":"2018-01-08T12:38:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/"},"wordCount":694,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","articleSection":["CSS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/","url":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/","name":"CSS Input Type Text Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","datePublished":"2015-06-05T09:15:40+00:00","dateModified":"2018-01-08T12:38:22+00:00","description":"In this example, we'll have a look at how we can style text inputs. Text inputs are very common in websites nowadays like in sign up forms, contact forms,","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/css\/css-input-type-text-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"CSS","item":"https:\/\/www.webcodegeeks.com\/category\/css\/"},{"@type":"ListItem","position":3,"name":"CSS Input Type Text 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\/4766","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=4766"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/4766\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/917"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=4766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=4766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=4766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}