9. Scripting

On today’s Web, client-side scripting—namely, JavaScript—makes the world go ’round. Or fade in and out. Or complete your search term as you’re typing it. Or drive an interactive news module. Or control a video player. Or . . . you get the idea.

Alas, showing you how to write JavaScript or any other scripting language is beyond the scope of this book, but I will show you the easy part, which is getting your scripts into a page.

Please also see “Attributes” in Chapter 1 for a list of the events you can apply and capture with JavaScript.

Scripting and Performance Best Practices

A full discussion of best practices pertaining to scripts and page performance is beyond the scope of this book, but I’ll touch on a few points that are high ...

Get The HTML Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.