Prev Demo
CSS3
>
Required Selector
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <style> input:required { background-color: pink; } </style> <body> <h3>Required selector</h3> <form> First name <input type="text" name="txt" required />*<br /> Middle name <input type="text" name="txt" /><br /> Last name<input type="text" name="txt" required />* </form> </body> </html>
Note: We DO NOT save your trial code in our database.
Output