Jukka Virtanen

HTML Examples (Both XHTML and HTML 5)
Example Description
HTML hello world page This is the first HTML5 web page you have seen
Empty HTML5 web page You may use this as a starting point for your HTML5 documents
Empty XHTML web page with validation logo You may use this to validate your HTML5 documents as XHTML documents. Simply put your HTML5 body stuff in the body of this document and validate at W3C
Link example where target is a fragment  
Header and paragraph example
XHTML 1.1 Inline Element Example Highlights Some XHTML Inline Elements.
img3.html Making an image in to a link.
pre.html pre element
table.html Basic table example
table_col_row_span.html Column and row span examples
table_content_example.html Illustration on what you can put inside cells
table_header_footer_body.html Table header, footer, body example
table_headers.html Table headers example
table1.html,table2.html,table3.html,table4.html,table5.html, Various small table examples from the lecture
form2.html Form example with text field
form4.html Form example with password
form5.html Form example with radio buttons
form6.html Form example with checkboxes
form7.html Form example with file selector
form8.html Form example with text area
form9.html Form example with scrolling menu
form1.html All form elements together
html5_webpage_structure.html Basic structural elements of a simple webpage
CSS examples
internalcss.html CSS inside an html file
externalcss.html
externalcss.css
External CSS example
selector_examples.html
css_selector.css
Selector CSS example
css_inheritance.html
css_inheritance.css
CSS inheritance example
css_inheritance2.html CSS inheritance example
boxmodelexample.html
boxmodelstyle.css
CSS box model example
drop_down_menu.html
CSS drop down menu example
float_example.html
floattextstyle.css
CSS float, z-index, position absolute, relative example
fonttext.html
fontextstyle.css
CSS font example
css project.zip
CSS website example for HTML5 website
JavaScript Examples
Example Description
hello_world1.html Hello world! for JS, version 1.
hello_world2.html Hello world! for JS, version 2.
jsNumberConversions.html This script illustrates converting values of various JavaScript data types into Numbers.
jsConversions.html This script illustrates various JavaScript conversions among various data types.
jsCoercions.html This script illustrates various JavaScript coercions (implicit casts).
alert.html This script illustrates alert.
confirm.html This script illustrates confirm box.
prompt.html This script illustrates prompting input.
alert.html This script illustrates alert.
date_example.html Date example
for_loop.html This script illustrates for loop.
while.html This script illustrates while loop.
if-else-if-else.html This script illustrates if-else-if-else structure.
redirect.html Execute JS after a specific time has elapsed.
cancel_interval.html Cancel a repeat.
function.html This script illustrates a js function.
dom1.html DOM example.
dom2.html DOM example.
dom_example.html
dom_example.js
dom_example_style.css
This example demonnstrates various DOM properties and methods. You need to have all 3 files in same folder
registration1.html Event registration example.
registration2.html Event registration example.
event1.html Event example.
event2.html Event example.
window.html window object example.
navigator.html navigator object example.
cookie1.html cookie example.
cookie2.html cookie example.
cookie3.html cookie example.
jsDynamicStyle.html
dynamic_style.html
First dynamic style uses DOM to set the event handlers. Second example uses onclick attributes hardwired into the html
PHP Examples
Example Description
first.php
first.txt
This is a very basic PHP script embedded webpage.
timestamp_examples.php
timestamp_examples.txt
Illustration of time(), date() functions.
for_loop.php
for_loop.txt
Illustration of for loop and date() and mktime() functions.
arrays.php
arrays.txt
Array manipulations
calculator.html
calculator.php
calculator.txt
calculator2.html
calculator2.php
calculator2.txt
Illustration of get and post methods.
email.php
email.txt
Form processing
sessions.php
sessions.txt
Session tracking
superglobals.php
superglobals.txt
Superglobal variables
regexphone.php
regexphone.txt
Regular expressions
php_mysql.php
php_mysql.txt
Demonstration of how to handle mysql with PHP
social_site.zip All files for social site example in compressed form

Ajax example

Form for the Ajax example
JS for the Ajax example
Text file that shows the content of getCityState.php

Valid XHTML 1.0 Strict