CIT 597 Quiz 3: Client-side JavaScript, CSS, and XML
Fall 2008, David Matuszek
Name_________________________________________
(10 points) Write the JavaScript command to pop up a dialog box with the words "You lose!" and an OK button.
alert("You lose!")
(10 points) JavaScript "global" variables are actually fields of some "global" object. In JavaScript code in HTML, what is the name of this object?
window
(or in some places,
this
)
(20 points) List the four parts of a CSS "box" in order (from outside to inside).
margin, border, padding, content
(10 points) What is the purpose of XML?
t
o provide a platform-independent representation of data;
or
to mark up data so it can be processed by computers
(10 points) What does it mean to say that an XML page is
valid
? (Hint:
two
requirements.)
It is well-formed (well-structured),
and
it satisfies a DTD (or some other schema)
(10 points) What is the syntax of a PI?
<?target instructions?>
(10 points) What is the purpose of namespaces?
To allow a document to reference more than one DTD,
or
to specify which DTD defines a given tag
(10 points) List the five XML entities.
& < > " '
(10 points) What is
mixed content
?
When an element contains both text and other elements