Question 19
Consider the following HTML document rendered using a browser.
<!DOCTYPE html><html lang="en"> <head> <title>Document</title> <style> input:valid { background: green; } input:invalid { background: red; } </style> </head> <body> <form> <label for="uname">Enter a valid e-mail:</label> <input type="text" name="uname" minlength="5" maxlength="8" value="a"> </form> </body></html>If a user starts typing "madcourse" letter by letter, how will the background colour of the <input> tag change?
Red for first five letters, turns green till 8th letter and turns red back again after next letter.
Red for first five letters, and remain green after that.
Green for first five letters, turns red till 8th letter and turns green back again after next letter.
Green for first five letters, and remain red after that.