TutorialKart
index.html
►
Run
Reset
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <style> select:invalid { border: 2px solid red; } select:valid { border: 2px solid green; } </style> </head> <body> <form> <label>Choose an option:</label> <select required> <option value="">Select one</option> <option>Option 1</option> <option>Option 2</option> </select> </form> </body> </html>