Code Examples



Welcome to my examples page! To view an example, click on the link, then go up to "View", then "Source" to see the actual code. If you have any questions regarding how to duplicate the examples, please feel free to e-mail me, or get in touch with my by phone, or drop by during office hours, and I'll be happy to go over them with you.



XHTML Template
XHTML Template
Linking
Linking Example
Tags & Example Simple Website
Simple Tags
List of tags
Sample Site--look at folder structure. Also under folder called "examplesite" in Student FTP.
Lists
Definition List
Ordered List
Unordered List
Mixed List
Images/Image Maps
Using an image as a background-Ex. 1
Using an image as a background-Ex. 2
How to Use Images
Image Map
Frames
(Note that when you view source on a frame page, you will just see the page that builds the frameset. If you right-click on each of the pages in the frames and select view source, you will see the source of the page within the frameset.)
Frameset 1
Frameset 2
Frameset 3
I-Frame-(May not display correctly in older versions of Netscape)
Tables
Table 1
Table 2
Table 3
Table 4
Table 5
Table 6
Table 7
Forms
Form Example 1
Form Example 2
Advanced Form 1
Advanced Form 2
CGI Form Mail Script
Multimedia/Java
Multimedia Example
Animation
Java example
Java example done the new way required by IE
External js file for Java Example for IE(open with notepad)
Lord of the Rings Site-Done in Flash
Javascript

Note: These will not validate. In order to validate a page with JavaScript within it, the JavaScript should be placed in an external file and called into the page. I did not do that here so that you could see the JavaScript code more easily just by viewing the source of each example.

JavaScript Alert
JavaScript Prompt
JavaScript Math
JavaScript Math 2
JavaScript Mouseover (only works in Internet Explorer)
JavaScript Mouseover with Event (only works in Internet Explorer)
Cascading Style Sheets
CSS-Inline Style Sheet
Embedded Style
CSS-HTML page using a Linked Style Sheet
CSS-CSS file that formats the HTML Page
CSS-HTML Page using a Linked Style Sheet 2
CSS-CSS file that formats the second HTML page
CSS-HTML Page demonstrating Combined Inline, Embedded, and Linked CSS
CSS-HTML Page Using a Linked Style Sheet with a Table
XML
(Note: please open using Internet Explorer, as straight XML is not handled well by Firefox and other browsers)
XML Document
XML CSS file
XML DTD

Pet database in xml
XSL File used with Pet database xml file
CSS file used with Pet database xml file
Final Web Page produced by Pet database xml, xsl, and css files together
Meta Tags
Using a Redirect Page
Meta Tag Transition (IE Specific!)