Prev Demo
CSS3
>
Optional Selector
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <style> input:optional { background-color: lightblue; border-color: red; } </style> <form> First Name<input type="text" required="required" />*<br/> Middle Name<input type="text" placeholder="This is Optional" /><br/> Last Name<input type="text" required="required" />* </form> </body> </html>
Note: We DO NOT save your trial code in our database.
Output