Class 9
Back to home page
Q. Why are forms so important in web development?
- Forms are used to collect the users imput. This can be especially useful with JS logic.
(Form controls are also called widgets)
Q. When designing a form, what are some key things to keep in mind when it comes to user experience?
- using fieldsets is a great way to make multiple widgets, but using to many can make screen readers have a tough time reading the material. Keeping forms simple is also important as you dont want to frusterate a user.
Q. List 5 form elements and explain their importance.
- Fieldset, the fieldset can create groups of widgets that share similar purposes.
- legend, the legend element is what describes the purpose of the widget.
- label, label is the formal way of defining an html widget.
- input, this is where the user inputs their data.
- textarea, this element is used if you expect a users answer to be long.
Learn JS
Q. How would you describe events to a non-technical friend?
- events are when something (like a user input) triggers something else to happen (or fires a command). For example when a plane is safe to take off, a signal will be “fired” to the pilot that its safe to take off.
Q. When using the addEventListener() method, what 2 arguments will you need to provide?
- We need the name of the event its listening for, and the code that will be fired off in responce.
Q. Describe the event object. Why is the target within the event object useful?
- An event object will pass extra information and features apon the event. The target is referencing the element that the the event occured on.
Q. What is the difference between event bubbling and event capturing?
- Event bubbling is when a concept in the DOM, and happens when an element receives an event, to which it bubbles up or trasmitted. Event capturing is the opposite, its when an event propogates from the target element.
Things I want to know more about
Event bubbling is a very interesting and confusing concept that i dont fully understand. Definetly need some examples and practice with event bubbling and event capturing.