Activity 8

1. What is commonly used for form validation?

2. What property identifies the HTML element that fired an event?

3. Which function is used for animations?

4. What prevents invalid inputs in a number field?

5. What is the default event propagation mode?

6. Which event triggers when an input box loses focus?

7. Which mouse event is triggered on a double click?

8. What event fires when the mouse enters an element and its children?

9. What method prevents pasting invalid characters into an input box?

10. What CSS property is essential for element animation?

Correct Answers

1. What is commonly used for form validation? ✅ Event handlers

2. What property identifies the HTML element that fired an event? ✅ event.target

3. Which function is used for animations? ✅ setInterval()

4. What prevents invalid inputs in a number field? ✅ onkeypress="return isNumber(event)"

5. What is the default event propagation mode? ✅ Bubbling

6. Which event triggers when an input box loses focus? ✅ onblur

7. Which mouse event is triggered on a double click? ✅ ondblclick

8. What event fires when the mouse enters an element and its children? ✅ onmouseover

9. What method prevents pasting invalid characters into an input box? ✅ onpaste="return false"

10. What CSS property is essential for element animation? ✅ position: absolute

Instructions:

Set Up Your Development Environment

Change Background Color by User Input

Final Output

Customize Your Background Color

Type in input box a color name or hex code and click the button to apply it.