As we’ve learned, there are three components to a web page. There’s HTML which is in charge of laying down the foundation of a website. Then, there’s CSS, which is in charge of making everything look visually appealing. Lastly, there is Javascript. Javascript is considered event-driven because it is all based on interactivity. JS is what adds interactivity to web pages. Essentially, it waits for the user to interact on the webpage, and then executes the code. An event could be something as simple as a user scrolling on a website or typing into a textbox. Javascript then has the ability to have code written to determine how the website should respond to these events. We’ve seen Javascript’s ability to be event-driven countless times throughout this course. For example, anytime we have worked with code that prompts us to type things into a textbox is JS using interactivity. Like in assignment 11, whatever we typed in the textbook triggered what was to come next and also what was to come in the final answer. All in all, Javascript is important when making websites interactive and is most definitely event-driven.
Image link: https://levelup.gitconnected.com/6-javascript-code-snippets-for-solving-common-problems-33deb6cacef3
Hey, Kayla, you did an outstanding job of explaining the three components of web pages and it helped me better understand these concepts.