© Mark J. Collins 2017

Mark J.  Collins, Pro HTML5 with CSS, JavaScript, and Multimedia, 10.1007/978-1-4842-2463-2_18

18. DOM Elements

Mark J. Collins

(1)Chesterfield, Virginia, USA

An HTML document is a specialized XML document and, like all XML documents, is comprised of a hierarchy of node elements. Each node can have a parent node and zero or more child nodes. In previous chapters, you created these nodes through some type of HTML editor or possibly a simple text editor. In this chapter, I will show you how you can read and manipulate these nodes through JavaScript.

Document Object Model

For a quick review, here is a very simple HTML document. It contains a head element that contains four child elements: a meta, title, link, and script element. ...

Get Pro HTML5 with CSS, JavaScript, and Multimedia: Complete Website Development and Best Practices 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.