value property CSS Reference

Definition and Usage

A form element may contain both a label for its data value, and the data value itself. For such elements, the ::value pseudo-element selects the representation of just the data value itself, in order to style its appearance.


element:value { style properties }


  <label>Zip code<label>
input { border:dashed }
label { border:dotted }
input::value { border:solid }

Relative articles