Reading-Notes

Reading Notes

HTML Forms

Your first Web Form.

How To Structure A Web Form.

Why are forms so important in web development?

It’s like a bridge to the user, allowing them to interact with the website. It could be from collecting data to letting the user interact with the site.

When designing a form, what are some key things to keep in mind when it comes to user experience?

Keep the form as simple as possible and only ask for the information you absolutely need.

List 5 form elements and explain their importance

  1. Fieldset: creates a group of widgets tha tshare the same purposes (ie for styling and semantic).
  2. Legend: an element that is nested just within the fieldset, the legend formally describes the purpose of the fieldset. Very useful for screen readers.
  3. Label: formaly defines a label for an html form widget. Also very useful for screen readers.
  4. It is also common practice to utilize list items, unordered lists, ordered lists, paragraphs, and division to create structure for multiple checkboxes or buttons.
  5. In addition, the headers and section are also used to stucture more complex forms.

Learn JS

Introduction To Events.

How would you describe events to a non-technical friend?

For some reason the first comparison that came into my head was that of a relay race. Setting up an ‘event listener’ is like all the runners getting ready to hear the gunshot go off; the gunshot is the event. After that happens, the baton follows the course of action of the code. Generating a random number, chosing a link to execute, presenting a preprogramed text bubble to pop up, or a dropdown menu to show. Whatever the runners are doing, none of them can do anything until that gun is fired. That is the event all the runners are listening for.

When using the addEventListener() method, what 2 arguments will you need to provide?

It will need to know what event it is looking for and then what you want it to do once the event is ‘heard.’

Describe the event object. Why is the target within the event object useful?

The event object is the specific element we are directing the eventListener to pay attention to for our specific action, or event. It is helpful to be able to specify this particular element in case you were wanting to inact a change in the code.

What is the difference between event bubbling and event capturing?

Order of operation. With even bubbling, the events find the most inner nested element and begin executing, whereas event capturing starts with the least nested item and works its way inward.