Quiz Space

Modern Application Development I · End Term · 24 Dec 2023 · September 2023 term · Set ADD3

Question 19: Consider the following HTML document rendered using a br…

Question 19

+4.5 marksOne correct option

Consider the following HTML document rendered using a browser.

html
<!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?

  1. A

    Red for first five letters, turns green till 8th letter and turns red back again after next letter.

  2. B

    Red for first five letters, and remain green after that.

  3. C

    Green for first five letters, turns red till 8th letter and turns green back again after next letter.

  4. D

    Green for first five letters, and remain red after that.

Show answer

Correct answer

  • B

    Red for first five letters, and remain green after that.

Question 19 of 32 in the IIT Madras BS Modern Application Development I (MAD 1) End Term paper sat on 24 Dec 2023, in the September 2023 term (IIT M DIPLOMA FN EXAM FDD1 24 Dec 2023). It carries 4.5 marks.

This question was also asked in

More questions from this paper

  1. Q1Figure question
  2. Q2How will the browser render the following HTML document?
  3. Q3Consider the statements given below and choose the correct option.\ Statement 1: 100% statement coverage automatically …
  4. Q4Consider a simple web server using command prompt. Filename - Hello.sh If this program creates a server in a terminal, …
  5. Q5Consider the following flask application. Python file: app.py Template file: profile.html If the application is running…
  6. Q6Consider the following function to be tested and test functions given in the Python code snippet below. test_file.py On…
  7. Q7Figure question
  8. Q8Consider the following models Creator and Song corresponding to tables creator and song in SQLite database. Based on th…
  9. Q9Which curl option is used to set the request method in an HTTP request?
  10. Q10Read the statements given below carefully and select the correct option.\ Statement 1: If an element is styled external…
  11. Q11Consider two python files, one.py and two.py with following code snippets. File1: one.py File2: two.py What is the outp…
  12. Q12Which of the following is not a web component?
  13. Q13Figure question
  14. Q14What is Emscripten in the context of WebAssembly?
  15. Q15The ORM(Object-Relational Mapping) sqlalchemy is used for?
  16. Q16Consider the following Python code snippet.
  17. Q17Given a Python code snippet, code.py is run on the terminal with an appropriate temp.html document.
  18. Q18Consider the following function to be tested and test functions given in the Python code snippet below. test_file.py Fo…
  19. Q20A flask application shown below is running locally on http://127.0.0.1:5000 If the application is running locally on <u…
  20. Q21Consider the following two code snippets. Snippet 1 Snippet 2 Which of the following is/are correct options if the abov…
  21. Q22Consider the following flask application. app.py Which of the following statements is/are true if the application is ru…
  22. Q23Figure question
  23. Q24Figure question
  24. Q25Consider the following Python code snippet. Which of the following options correctly represent(s) the dictionary var_di…
  25. Q26An HTML code is given below then which of the following CSS code will render the output as shown below.
  26. Q27Consider the following python code snippet and choose the correct option.
  27. Q28Consider the following flask application. If the application is running locally on http://127.0.0.1:5000, select the co…
  28. Q29Given below is a part of the HTTP response upon running the command: HTTP response Based on the above data, answer the …
  29. Q30Given below is a part of the HTTP response upon running the command: HTTP response Based on the above data, answer the …
  30. Q31What is the maximum number of requests that can be made to A per second?
  31. Q32What is the round trip time (RTT) in milliseconds for server C?