HTML : grouper des choix dans une liste déroulant (select, option et optgroup )

/ Published in: HTML
Save to your folder(s)

Copy this code and paste it in your HTML
  1. <select name="produits">
  2. <optgroup label="Viandes">
  3. <option selected="selected">Boeuf</option>
  4. <option>Porc</option>
  5. <option>Poulet</option>
  6. <optgroup label="Légumes">
  7. <option>Salade</option>
  8. <option>Carotte</option>
  9. <option>Bétrave</option>
  10. <option>Chou</option>
  11. </select>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.