Answers for "how to set placeholder in select option"

9

placeholder select html

<!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>
Posted by: Guest on December-21-2020
1

placeholder in html select

<option value="" selected disabled hidden>Select Here</option>
Posted by: Guest on September-29-2020
0

How do I make a placeholder for a 'select' box?

<select>
    <option value="" disabled selected>Select your option</option>
    <option value="hurr">Durr</option>
</select>
Posted by: Guest on April-28-2021

Code answers related to "how to set placeholder in select option"

Browse Popular Code Answers by Language