summer smash

chapter 6

by Justin Harker

HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Summer Smash 2010 Registration</title>
<link href="https://fonts.googleapis.com/css?family=Frijole" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/print.css" media="print"> 
/*links a style sheet view which is a printer friendly version of the webpage*/
<script src="js/javascript.js"></script>
</head>
<body>
<div id="pagewrap">
<header>
<a href="/">
<h1>Summer Smash 2012</h1>
<p>This summer's most smashing event!</p>
</a>
</header>
<section id="main">
<section id="registration_form">
<form action="/registration/">
<fieldset>
<legend>Registrant Information</legend>
<ol>
<li class="formitem">
<label for="name">Registrant name:</label>
<input type="text" name="name" id="name" required autofocus />
</li>
<li class="formitem">
<label for="email">Email address:</label>
<input type="email" name="email" id="email" required />
</li>
<li class="formitem">
<label for="phone">Phone number:</label>
<input type="tel" name="phone" id="phone" />
</li>
<li class="formitem">
<label for="party">How many people do you have in your party (including yourself)?</
label>
<input type="number" name="party" id="party" min="1" max="10" />
</li>
<li class="formitem">
<label for="dob">Your date of birth:</label>
<input type="date" name="dob" id="dob" />
</li>
</ol>
</fieldset>
<fieldset>
<legend>A few quick questions</legend>
<ol>
<li class="formitem">
Is this your first Summer Smash event?
<ul>
<li>
<input type="radio" name="yes_first" id="yes_first" value="1" />
<label for="yes_first">Yes, this is my first</label>
</li>
<li>
<input type="radio" name="no_first" id="no_first" value="0" />
<label for="no_first">No, I've been to one before</label>
</li>
</ul>
</li>
<li class="formitem">
<label for="how_hear">How did you hear about Summer Smash 2012?</label>
<input type="text" name="how_hear" id="how_hear" list="media">
<datalist id="media">
<option value="Google...

CSS

/* RESET STYLES */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:cream;
}
body {
line-height:1;
}
article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
display:block;
}
nav ul {
list-style:none;
}
blockquote, q {
quotes:none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content:";
content:none;
}
a {
margin:0;
padding:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
/* change colours to suit your needs */
ins {
background-color:#ff9;
color:#000;
text-decoration:none;
}
/* change colours to suit your needs */
mark {
background-color:#ff9;
color:#000;
font-style:italic;
font-weight:bold;
}
del {
text-decoration: line-through;
}
abbr[title], dfn[title] {
border-bottom:1px dotted;
cursor:help;
}
table {
border-collapse:collapse;
border-spacing:0;
}
/* change border colour to suit your needs */
hr {
display:block;
height:1px;
border:0;
border-top:1px solid #cccccc;
margin:1em 0;
padding:0;
}
input, select {
vertical-align:middle;
}
/* END RESET */
/* set the page width to 80% of the page, and set up a relative margin 4em, and change the font */ 
div#pagewrap {
width: 80%;
margin: 4em auto;
font-family: Verdana, Arial, sans-serif;
}
/* set up the page header, section, aside, and footer block level elements */ 
header {
padding: 1em 0 2em;
}
/* set a section margin of 2em 2% */
section#main {
float: left;
margin: 2em 2%;
}
section#registration_form {
width: 74%;
float: left;
padding: 0 1% 0 0;
}
aside {
width: 21%;
float: right;
}
/* format aside to...

JavaScript

<script>
// this will run as soon as it is read by the browser
var userMessage="hello, world!";
//this will run only when it is invoked
function initialize(){
var msg = "hi there";
}
</script>