HTML and CSS Reference
If necessary, click line 19, and position the insertion point to line up under the <script>
tag on line 6.
Type </script> to close the <script> section, but do not press the e n t e r key
Can I use one hyphen and the greater than sign to end the comment?
No, it must be two hyphens and the greater than sign to close the comment.
end of <script> section
do not press
the e n t e r key
Adding an Onload Event Handler
The last step in adding a scrolling message to a Web page is to add an event handler
to start the scrolling message when the Web page loads. As discussed in Chapter 9, an
event is an action, such as a mouse click or a window loading. An event handler is a
way to associate that action with a function. The event handler that starts the scrolling
message is the onLoad event handler and is placed in the <body> tag.
handlers, as shown in Table 10-8 on the next page. To be HTML5 compliant and to pass
HTML5 validation, this text follows the HTML5 standards. Because HTML5 allows for
text will use the mixed-case event handlers.