Name: ________________________________________________________________
UD Email: _____________________________________________@ udel.edu
Are you classified as a freshman (circle one): YES NO
Circle your section number:
010 (Tuesday Lab) 011 (Thursday Lab)
Do not write your name on any page except this one.
Answer the multiple choice questions on the scantron sheet.
Answer the remaining questions on this paper directly.
Total Points: ???
A hint about allocating your time:
You need to answer 100 points worth of questions in 75 minutes, so....
That will allow you to complete 100 points worth of questions in 50 minutes.
Then you'll have 25 minutes left over so that you can either
(Reference: Lecture Notes of Oct 3rd)
In JavaScript, every value and every variable has one of six types:
number | null |
string | object |
boolean | function |
I've eliminated "function" as one of the possible responses. Given that, for each of following indicate what the browser would show as the result, if the JavaScript given were placed in the address bar of the browser.
Example:
javascript: x=5; typeof(x);
(a) number
(b) string
(c) boolean
(d) null
(e) object
Answer: (a) number
javascript: x=13; typeof(x);
(a) number
(b) string
(c) boolean
(d) null
(e) object
javascript: x='Fred'; typeof(x);
(a) number
(b) string
(c) boolean
(d) null
(e) object
javascript: x=true; typeof(x);
(a) number
(b) string
(c) boolean
(d) null
(e) object
javascript: x='false'; typeof(x);
(a) number
(b) string
(c) boolean
(d) null
(e) object
javascript: x="new Date"; typeof(x);
(a) number
(b) string
(c) boolean
(d) null
(e) object
javascript: x=new Date; typeof(x);
(a) number
(b) string
(c) boolean
(d) null
(e) object
javascript: x=5 + 1; typeof(x);
(a) number
(b) string
(c) boolean
(d) null
(e) object
javascript: x="5" + 1; typeof(x);
(a) number
(b) string
(c) boolean
(d) null
(e) object
javascript: x="Fred's"; typeof(x);
(a) number
(b) string
(c) boolean
(d) null
(e) object
javascript: x="<p>5</p>"; typeof(x);
(a) number
(b) string
(c) boolean
(d) null
(e) object
(References: Head First HTML p. 59-71, lab03, Sep 12 notes)
For each of the following links, indicate whether it refers to (a) an absolute path, or (b) a relative path
<a href="foo.html">foo</a>
(a) absolute (b) relative
<a href="http://www.udel.edu/help">help page </a>
(a) absolute (b) relative
(References: Lecture Notes of Sep 26)
For each of the following alert boxes, write beside it, the JavaScript statement that would produce it.
Example:
window.alert("blah");
(References: Labs 02-05, Head First HTML Chapters 1-3, Lecture Notes of Oct 3)
Along with this exam, you were given a separate handout with an example web page (shown in color) about Antioxidants. and a page of specific instructions on how to write that page.
In the space below and continuing on the following page(s), please write the HTML for this web page, according to the following specific instructions. (Note: if you don't know how to do part of this, just do the parts you do know how to do, for partial credit.)
<!-- extra space for your answer -->
<!-- extra space for your answer -->
(p. 18 of the JavaScript book, and p. 94-97 of the Head First HTML book, Lecture Notes of Oct 3rd)
(End of Exam)
Note that I'm giving you a lot of the details here, because I'm not interested in testing your ability to memorize—instead I want to test your ability to use HTML and CSS and to apply concepts such as nesting, elements, attributes, properties and values, and write them using the proper syntax.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
body
, head
, html
, style
, and title
.
type
with the value text/css
so don't forget to add that.body
element, and in appropriate tags to indicate whether it is a regular paragraph, or a heading. You'll need the <p>
tag, as well as the <h1>
, <h2>
and <h3>
tags.text-align
with the value center
to center the top level headline "Antioxidants"hr
elements (with a self-closing tag) to separate the three sections of the web page. <em>
tag to markup the text wild so that it is emphasized (and by default, appears in italics).<a>
tag to make the word "caffeine" be a link to the web address http://en.wikipedia.org/wiki/Caffeine
font-family
and the value is sans-serif
. Hint: what element should you apply the property to so that it affects the entire web page? id
attribute on the appropriate HTML element, along with CSS to make the words "Green Tea" the color green. (Remember that in the style sheet, you put a # in front of the name of an id before specifying its properties. The property you need is color
) class
attribute to make the words "Blueberries" and "Black Currant" appear in the color blue.