reading-notes

Forms and JS Events

HTML Forms

Your first Web Form. How to Structure A Web Form.

  1. Why are forms so important in web development? Forms are important because they allow web devs the to make elements that the user can interact with and even get user input to do even more things with.

  2. When designing a form, what are some key things to keep in mind when it comes to user experience? Broadly speaking, we want to design forms to be “dummy proof”. Designed in such a way that it’s for the user hard not to get it right. We want the form to have ways built-in data validation, to ensure users input the data we’re looking for. We also want to ensure our syntax is on point.

  3. List 5 form elements and explain their importance.
  4. <label>: Provides a caption for the user
  5. <input>: The part where users can interact with
  6. <textarea>: A textbox for multi-line user inputs
  7. <button>: Button for the user to “submit” the form
  8. <form>: Denotes a section of a document for user input

Learn JS

Introduction to Events

  1. How would you describe events to a non-technical friend? Events are ways the browser “reacts” to an internet surfer’s actions. Like when links change from blue to purple once you’ve clicked on it.

  2. When using the addEventListener() method, what 2 arguments will you need to provide?
  3. type
  4. listener

  5. Describe the event object. Why is the target within the event object useful? It lets us decide which element will trigger the event.

  6. What is the difference between event bubbling and event capturing? Event capturing is the is when the event happens from parent to child. Event bubbling is when the event happens from child up to parent.

Bookmark and Review

HTML5 Input Types

Event Reference and listings

Things I want to know more about