Forms are used for collecting data from users, or allowing them to control a user interface.
When designing a form, what are some key things to keep in mind when it comes to user experience?
Before starting to code, it’s always better to step back and take the time to think about your form. Designing a quick mockup will help you to define the right set of data you want to ask your user to enter. From a user experience (UX) point of view, it’s important to remember that the bigger your form, the more you risk frustrating people and losing users. Keep it simple and stay focused: ask only for the data you absolutely need.
List 5 form elements and explain their importance:
: the element that allows user input in a single line of text.
How would you describe events to a non-technical friend?
Events are things that happen in the system you are programming, which the system tells you about so your code can react to them. Like when you click on a webpage and an information box is displayed.
When using the addEventListener() method, what 2 arguments will you need to provide?
the string to indicate that we want to listen to the event
the function that we want to call when the event happens
Describe the event object. Why is the target within the event object useful?
it is an object that is automatically passed to the event handlers to provide extra features and information about the event.
What is the difference between event bubbling and event capturing?
Event Bubbling describes how the browser handles events targeted at nested elements. Event Capture is like bubbling but in reverse order.