<!DOCTYPE html>
<head>
</head>
<body>
<select name="food">
<!-- The following line makes a placeholder -->
<option value="" disabled selected hidden>select food</option>
<option value="apple">apple</option>
<option value="melon">melon</option>
</select>
</body>
// A non-CSS - no JavaScript/jQuery answer:
// add option and disable it, it will act like placeholder.
<select>
<option value="" disabled selected>Select your option</option>
<option value="optionA">optionA</option>
</select>
// disabled hidden play as a role of placeholder, as select input dosn't have placeholder
<select name="monthname" required>
<option value="" selected disabled hidden>Select Month</option>
<option value="Jan">January</option>
<option value="Feb">February</option>
<option value="Mar">March</option>
<option value="Apr">April</option>
<option value="May">May</option>
<option value="Jun">June</option>
<option value="Jul">July</option>
<option value="Aug">August</option>
<option value="Sep">September</option>
<option value="Oct">October</option>
<option value="Nov">November</option>
<option value="Dec">December</option>
</select>
<select style='color:gray' oninput='style.color="black"'>
<option style='display:none'>
Choose an option
</option>
<option>
1
</option>
<option>
2
</option>
<option>
3
</option>
</select>
<option value="" selected disabled hidden>Select Here</option>
<option default>Select Your Beverage</option>
Code Example |
---|
Html :: bootstrap cdn link |
Html :: rs logo html |
Html :: center text v-card |
Html :: http://127.0.0.1:5500/favicon.ico |
Html :: how to center html heading |
Html :: print page button html |
Html :: autoredirect html |
Html :: html tab space |
Html :: refresh button html |
Html :: space character in react html |
Html :: html input type file accept text and word files |
Html :: box shadow svg css |
Html :: commnet in html |
Html :: viewport meta |
Html :: gender selection in html |
Html :: html textarea height |
Html :: html power |
Html :: font awesome cdn |
Html :: auto update copyright year javascript |
Html :: open whatsapp html |
Html :: target blank |
Html :: bootstrap 4 stop auto slide |
Html :: htaccess code to remove .php extension |
Html :: Add fav icon to browser tab |
Html :: min number input html |
Html :: discernible name |
Html :: linked image html |
Html :: hint text html |
Html :: how to put image center in html stack overflow |
Html :: nuxt paginate bootstrap 5 |