O'Reilly logo

The Definitive Guide to HTML5 by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C H A P T E R  31

Using the Element-Specific Objects

The Document Object Model (DOM) defines a set of objects that represent the different types of HTML elements in a document. These objects can be treated as HTMLElement objects and, for the most part, that’s what you typically do in your scripts. But if you want to access some attribute or feature that is unique to an element, you can usually do so using one of these objects.

These objects are not much use. They generally define properties that correspond to attributes supported by an element, the value of which you can access through the features of the HTMLElement. There are a couple of exceptions—the form elements have some helpful methods for use with input validation, and the table elements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required