placeholder select html

92

select input placeholder -

// 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>

html select placeholder -

<option default>Select Your Beverage</option>

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>

Comments

Submit
0 Comments