Java Reference
In-Depth Information
<HTML>
<HEAD>
<BODY>
<H1>
<P>
'My Heading'
'This is some
text in a
paragraph'
Figure 12-2
Simple, eh? This example is almost too straightforward, so let's move on to a slightly more complex one
that involves a table as well.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>This is a test page</title>
</head>
<body>
<span>Below is a table...</span>
<table border=”1”>
<tr>
<td>Row 1 Cell 1</td>
<td>Row 1 Cell 2</td>
</tr>
<tr>
<td>Row 2 Cell 1</td>
<td>Row 2 Cell 2</td>
</tr>
</table>
</body>
</html>
There is nothing out of the ordinary here; the document contains a table with two rows with two cells
in each row. You can once again represent the hierarchical structure of your page (for example, the fact
that the <html/> element contains a <head/> and a <body/> element, and that the <head/> element
contains a <title/> element, and so on) using your tree structure, as shown in Figure 12-3.
Search WWH ::




Custom Search