Java Reference
In-Depth Information
An Example Web Page
To illustrate the DOM concepts covered in this chapter, we'll use a basic web page that
contains a heading and three paragraph elements. Save the following code in a file called
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Triathlon DOM</title>
<h1 id="title">Triathlon</h1>
<section id="sports">
<p class="swim">Swim</p>
<p id="bike">Bike</p>
Figure 6.2 shows what this web page would look like as a node tree diagram.
Search WWH ::

Custom Search