Forms are important because they allow users to input data that the website can dynamically use.
Some key things to kep in mind when ic comes to user experience are “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” source
<form> Defines the form, also can have special attributes but they’re optional.
<label> Which is pretty self-explanatory, it labels what the text area requires
<input> Changes the of user input field on the site.
<textarea> Is the actual place that the user will type their input into the form
<button> Will allow the user to submit their data
Events are similar to triggers or a cause and effect. When something occurs something else will trigger or happen.
You need to provide the type of event can listen to and a function to call when the event happens when using the addEventListener() method.
“Event objects provide extra features and information” source. The target within the event object is useful because it only applies to the element that the event occured on.
“Event bubbling describes how the browser handles events targeted at nested elements” events start on most nested elements and works it’s way out while event capture is reversed. Meaning: events start on elements that are least nested within the document and works its way in. source
"click" for the btn.addEventListener() does the computer automatically recognize click.