Although you can just put SCRIPT elements in the body there is a more powerful way to trigger JavaScript.
JavaScript is an event-driven language. This means that you can make things happen when a user does something.
Copy this into an otherwise empty Web page:
<p>Try hovering over the red words <span onmouseover="alert('Hello again');" style="color:red;">just here</span> to see what happens.</p>
Show that in a browser and hover your mouse cursor over the words.
Note that there are no SCRIPT tags but instead the script is held as a value to an attribute. The attribute is ONMOUSEOVER and the value contains what to do when the user hovers the mouse over on that HTML element. This is very similar to how inline CSS is done. You can attach an event like this to any HTML element. There will be more on events very soon.
There is another way to monitor events but this is still acceptable and is simpler at this stage (just like in-line CSS is fine but less powerful than embedded or external).



