<html>
<head>
<style>
#L1 {position: absolute; left: 100px; top: 100px;}
</style>
<script id='listing_1' src='listing_1.js'></script>
<script id='listing_2' src='listing_2.js'></script>
</head>
<body>
<div id='L1'><img name='Img1' src='Image1.gif'>
</div>
<img name='Img2' src='Image2.gif' align='top'>
An example of a floating element.
<br>
<!-- a comment just for fun -->
<form name='form1Name' id='form1ID'><textarea id='txtarea'>
                                      ha ha ha</textarea></form><br>
<a href="javascript:showDOM()">show DOM</a>
</body>
</html>

Example 2: Using Listing Two's scripts to display the DOM of a page similar to Example 1.

Back to Article