Insert what option is selected -->

In order to add styling to the input, I set the -webkit-appearance to none (webkit and moz are vender prefixes for chrome and mozilla's FireFox). The 28 pixel value used here and in the previous rule is equal to the width of the image plus some additional padding so that the label text is not too close to the image. Line 6 displays the unchecked image in the space before the label text. Finally, we display the selected images when the checkboxes and radio buttons are selected: CSS CSS Reference CSS Browser Support CSS Selector Reference Bootstrap 3 Reference Bootstrap 4 Reference W3.CSS Reference Icon Reference Sass Reference. JavaScript Alert the label value of the selected option in a drop-down list: var x = document.getElementById("mySelect").selectedIndex; Input and Select.

Chart test