In certain circumstances described in the definition of the select element, an option element can be a select element's placeholder label option. The id attribute is needed to associate the drop-down list with a label. We will be looking into several approaches that can allow us to set color in input placeholder. Other (links, license) Created and maintained by Piotr and Oskar. All code belongs to the poster and no license is enforced. Please give us a Like, if you find it helpful. Вид текста, созданного с помощью атрибута placeholder Firefox 4 допускает изменять стиль текста, выводимого через атрибут placeholder , с помощью псевдокласса :-moz-placeholder . The select dropdown a class called say not_chosen and style it in whatever way we want, to make the default option look like a placeholder, in this case just a different text color. $('select').select2({ placeholder: { id: '-1', // the value of the option text: 'Select an option' } }); This is useful, for example, when you are using a framework that creates its own placeholder option. Angular Quick Tip — How to Show a Placeholder in Select Control. Strategies for Select Dropdown Lists Placeholder. Introduced as part of the HTML5 specification, the placeholder attribute “represents a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. Normally, HTML input field placeholder text is rendered using default styles and a slightly gray color. Questions: I am trying to make a dropdown list that contains a placeholder. HTML5 IE Cr Op Sa Fx The Purpose of this article is to make a placeholder in select that should help prevents bad selections with and make it easier to validate if no selection is made. I have tried adding it through the data attribute and through javascript. Try and test HTML code online in a simple and easy way using our free HTML editor and see the results in real-time. Topic: HTML / CSS Prev|Next Answer: Use the disabled and selected Attribute. Both of these circumstances can interfere with successful form completion, especially for people with cognitive concerns. JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code. I find it very strange, but two times people have asked the same question in SO and still have not found a satisfactory answer.. Before that, Lets see how we can actually add placeholder in input field with a basic example. How to add a placeholder to select element in html. ; Each option is wrapped in