Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html select required

<select name="color" id="color" required>
	<option value="" selected disabled hidden>Choose color...</option>
    <option value="R">Red</option>
    <option value="B">Blue</option>
</select>
Comment

select required

<label for="cars">Choose a car:</label>

<select name="cars" id="cars" required>
  <option value="">None</option>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="mercedes">Mercedes</option>
  <option value="audi">Audi</option>
</select>
Comment

required option for select tag

<!--- This option cannot be select and this will be default option too. -->

<option selected="true" disabled="disabled">Select a Option</option>

<!-- Here is a example : -->
<label for="payment">Choose a Type :</label>
<select name="payment" required>
  <option selected="true" disabled="disabled">Select a Option</option>
  <option value="recharge">Recharge</option>
  <option value="withdraw">Withdraw</option>
</select>
Comment

PREVIOUS NEXT
Code Example
Html :: block level elements 
Html :: time input html 
Html :: how to add an ident in html 
Html :: whats app chat link for html 
Html :: how do i get the toggle menu on the right bootstrap 
Html :: bootstrap 5 navbar not working 
Html :: html player 
Html :: how to make a password system in html 
Html :: bootstrap navbar simple 
Html :: link in md 
Html :: html accordion generator 
Html :: thymeleaf form delete method 
Html :: cahnge bootstrap navbar color 
Html :: array in html form 
Html :: year dropdown in html 
Html :: html js script 
Html :: edit box with a drop-down list 
Html :: frames html example 
Html :: insertar html en react 
Html :: stimulus value 
Html :: px in react 
Html :: html ms-text-size-adjust 
Html :: html div 
Html :: vuejs v-on 
Html :: html auto change year 
Html :: how to add image in html from a folder 
Html :: typo3 headerdata 
Html :: onchange for contenteditable div 
Html :: hello world svelte 
Html :: html get user screen resolution 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =