Use an input element and add the placeholder attribute: In most browsers, the placeholder text is grey. HTML5 has an attribute called placeholder. In this case, the font size of
elements will be double the computed font-size inherited by
elements. 1.4.12 Text Spacing (AA) In content implemented using markup languages that support the following text style properties, no loss of content or functionality occurs by setting all of the following and by changing no other style property:. The color property specifies the text color. La propiedad de CSS color selecciona el valor de color de primer plano del contenido de elemento de texto y decoraciones de texto.Tambien establece el valor currentcolor (en-US) que se puede usar como un valor indirecto en otras propiedades, y es el valor predeterminado para otras propiedades de color, como border-color.. Para obtener una descripcin general del Using class. Here is an example of how you could do this:.input-focus-i:focus { Note that Firefox adds a lower opacity to the placeholder, so we use opacity: 1 to fix this. Since this question was asked quite a few things have happened in the web realm, and one of the most exciting is the landing of web components.Now you can solve this issue elegantly with a custom HTML5 element designed to suit your needs.