2 . 6 - Connecting HTML to Functions
2 . 6 - Connecting HTML to Functions
2.6 - Connecting to HTML
Review
HTML is the front-end language that describes how a document should look
CSS is the makeup that makes an HTML document prettier
JavaScript is the back-end language that allows us to write instructions to the computer
We compartmentalize our code into smaller mini-programs called functions to help with organization and reduce repetition of code
HTML can call JavaScript Functions and JavaScript can modify HTML!
We can make HTML Elements react to user input (clicks, mouse movements, keyboard presses, etc)
When a user interacts with an HTML element, this creates an Event
We can tell JavaScript to listen for an event by using Event Listeners (sounds simple enough, right?)