Best Practice: Use native form elements whenever possible

This article was published 2 years, 10 months ago. Due to the rapidly evolving nature of web development, some concepts may no longer be applicable.

I just wrote the following for our marketing team to understand why we recommend not styling forms. If you have any feedback, I would love to hear it in the comments section!

Our recommendation is that only minimal styling be applied to form elements. When possible, using the native form elements is the most accessible solution. When we do apply styles, we should make sure that it degrades gracefully, and doesn’t cause problems in older browsers. Clients need to understand that making forms look identical across all browsers is NOT possible. This is a limitation inherent to the browsers themselves. (see the further reading below, in particular, Eric Meyer’s post.)

In the past, we have tried to promise cross-browser styling, such as by using the Uniform jQuery library, and have found, without exception, that this adds a dramatic amount of time to the front-end development of the site, due to the difficulties of forcing styles onto elements that weren’t built to support those styles. If a client insists on heavy form styles, we should make sure to charge an appropriate amount to cover the increased development and QA time.

Some things are relatively easy to style, such as plain text inputs and submit buttons. Other things, such as drop-down menus, radio buttons, or file select inputs, are nearly impossible to style. Since we can’t say for sure what works and what doesn’t, we’re left with a fairly vague recommendation to use “minimal styling” on form elements. In practice, this translates to borders, padding, and background colors on text inputs, though even these will look somewhat different across browsers. We can also do pretty much anything to submit buttons, because we can replace them with images — though again, there are difficulties, and the native buttons are more accessible and recognizable.

Further Reading:

About Scott Vandehey

Scott is a CSS Ninja who has been creating web sites for over 15 years. He lives in sunny Portland, Oregon with his wife and daughter, and spends his free time playing video games and watching movies. He is probably not a Cylon.

View all posts by Scott Vandehey

One Response to “Best Practice: Use native form elements whenever possible”

  1. Joshua Jenkins

    I hope this doesn’t come across as spam, but I’ve created a website that lists out all the HTML form elements as a reference point for people to see what every form element looks like for their operating system and browser. It’s located at nativeformelements.com

    The site is a work in progress that will eventually include the form elements in all the major browsers and operating systems.