<body> Hi! </body>
</script>. The code placed between
</head>. Sometimes, people embed the code in the
Put text in an HTML page on-the-fly.
Say you want to display a nice thank you message to a user who has just submitted a comment form on your website. Obviously, the message needs to be added after the user has submitted the form.
You could let the server do that. However, if your website is very busy and your server processes hundreds of forms a day, it might take a little while for your thank you message to appear to the user.
Make your web pages responsive.
Web environments are dynamic, things happen all the time: the web page loads in the browser, the user clicks a button or moves the mouse over a link, etc. These are called events (which will be the topic of lesson 3).
Detect visitors’ browsers.
Validate web form data.
And much … much more.