Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
You can tear out the HTML and CSS Reference Cards for easy access.
Please use PEN to answer the questions in Section B and Section C.
Office Use Only:
Questions
Attempted?
Marks
Section A:
(Q1-Q20)
Section B:
(Q21-Q30)
Section C:
(Q31)
Section C:
(Q32)
P a g e !|!1!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
Section!A:!Multiple!Choice!Questions!(20!marks)!
There are 20 questions in this section. Each question is worth 1 mark.
Candidates should answer ALL questions in this section.
Identify the letter of the choice that best completes the statement or answers the question.
Make sure you mark the answers on the multiple question answer sheet provided.
This will be marked automatically by a computer program.
Marks will not be allocated if you answer the multiple choice questions here.
1. Which of the following relative pathnames is interpreted as “the chem.htm file is in the tutorial subfolder one
level above the current file in the folder tree”?
A.
B.
C.
D.
__/tutorial/chem.htm
/tutorial/chem.htm
../tutorial/chem.htm!
./tutorial/chem.htm
2. When placing a form in a page to allow user data to be sent to a server program, where is the URL of the
destination specified?
A.
B.
C.
D.
in the value attribute of the submit button.
in the href attribute of the <form> tag
in the action attribute of the <form> tag
in an address element within the form
3. The ____ attributes define the dimensions of a text area.
A.
B.
C.
D.
height and width
rows and cols
top and bottom
high and wide!
4. ____ is a video format developed by Apple Computer for Windows and Apple computers.
A.
B.
C.
D.
MPEG
AVI
RealVideo
QuickTime
5. To embed a video file, you must specify a source for the embedded video clip with the ____ attribute and a
size for the clip using the height and width attributes.
A.
B.
C.
D.
Link
Frame
Embed
Src
P a g e !|!2!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
6. Given a For loop counter of for!(i!=!1;!i!<=!5;!i++) , the counter values are ____.
A.
B.
C.
D.
1, 2, 3, 4, and 5
5, 4, 3, 2, and 1
5, 10, 15, 20, and 25
d. -1, -2, -3, -4, and -5
7. How can we use JavaScript to dynamically change the second image on a page to display "exam.gif"?
A.
B.
C.
D.
document.images[1]="exam.gif";!
document.set(images[1],"exam.gif");!
document.images[1].src="exam.gif";!
document.images[2]="exam.gif";!
!
8. Among the following types of style rules, ____ has the highest priority.
A.
B.
C.
D.
Browser Default Rules
Author Style Rules
User Defined Rules
Any Inline Styles
9. Which of the following sets a width of 150!pixels to any element named title from any namespace?
A.
B.
C.
D.
#|title!{width:!150px}
*|title!{width:!150px}
^|title!{width:!150px}
?|title!{width:!150px}
10. The namespace URI http://purl.org/rss/1.0 corresponds to which of the vocabularies below?
A.
B.
C.
D.
RSS 1.0
SMIL
SVG
XHTML
11. If you want to organise a collection of web pages to show young primary school students how to build a
model airplane, which is the most suitable site structure?
A.
B.
C.
D.
A non-linear structure
A linear structure
A hierarchical structure
A mixed structure
12. Which of the following cannot be part of an absolute URL?
A.
B.
C.
D.
An access scheme like this:!mailto:!
A directory path like this: ../../labs/
A fragment identifier like this: #top
A file name like this: My%20Page
P a g e !|!3!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
13. Which of the following HTML code will not produce centered text?
A.
B.
C.
D.
<center>Text!goes!here.</center>!
<div!align=”center”>Text!goes!here.</div>!!
<div!style=”text"align:center”>Text!goes!here.</div>!
<span!style=”text"align:center”>Text!goes!here.</span>
14. Which of one of the following statements is false?
A. The World Wide Web can be thought of as an interconnected network of web
resources through hyperlinks.
B. The concept of the Internet and the Web can be used interchangeably. They both refer
to accessing documents through networked computers.
C. The Internet is a series of interconnected computer networks.
D. The World Wide Web is one of the most popular Internet applications, which also
include emails, news groups, and etc.
15. Which one of the following statements is true?
A. In HTML, element names are case sensitive.
B. In HTML, the attributes can be put in either the opening tags or the closing tags of an
element.
C. In HTML, the closing tag </p> is optional.
D. <title> element will produce large fonts in the browser document area because large
fonts are prominent and suitable for titles.
16. URLs can be used in many different situations to address a Web resource, which of the following is not a
valid situation?
A. A URL can be used in an <img> element to indicate where the image should come
from.
B. A URL can be used in the <form> element to indicate the program used to process the
form data.
C. A URL can be used in the <link> element to connect to an external style sheet.
D. A URL can be used in the <title> element to connect this document to a relevant
document.
17. Which of the following statements about the <a> tag is true?
A. Specifying an internal section of a Web page only requires an anchor element with a
name attribute.
B. By default, an anchor element always produces a hyperlink.
C. The only valid attribute for an anchor element is href.
D. Anchor elements can only be used in the navigation bar of a Web page.
P a g e !|!4!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
18. In CSS, you can override precedence rules by adding the ____ property to a style declaration.
A.
B.
C.
D.
!override
!main
!important
!priority
19. The style rule li!em!{color:!blue}!indicates the content of ____ will appear in blue colour.
A.
B.
C.
D.
Both <em> and <li> elements
Any <em> elements that are inside a <li>!element
The first <em> element that’s inside a <li> element
The <li!em> element
20. The ____ protocol supports transferring files between a client program and a file server.
A.
B.
C.
D.
FTP
HTTP
UseNet
SMTP
P a g e !|!5!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
Section!B:!Long!Answer!Questions!(50!marks)!
There are 10 questions in this section. Each question is worth 5 marks.
Candidates should answer ALL questions in this section.
Answers must be written in the space provided.
If no enough space, write on the spare pages provided at the end of the paper.
Make sure you clearly indicate the questions you are answering.!
21. Explain which is more portable: absolute or relative URLs?
22. Explain how client-side scripting is different from server-side scripting? What benefits does a client-side
program bring? Why is it important to implement a server-side backup for client-side form validation?
P a g e !|!6!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
23. Give two reasons why some physical elements such as <font> and <small> are deprecated in favour of CSS?
24.
Explain the roles of a Web Browser and a Web Server in the two way transaction of Web Surfing.
P a g e !|!7!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
25. What’s the difference between AJAX and DHTML?
26. What is a schema? What are the advantages of schemas over DTDs?
P a g e !|!8!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
27. Explain what a Document Object Model (DOM) is. Think of a brief example of using an object reference
given by JavaScript's DOM to do something useful in a web page. Give the JavaScript code for your example
and explain what it does.
28. List the key differences between Java and JavaScript.
P a g e !|!9!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
29. Define each of the following: URI, URL, and URN.
30. Discuss how to declare a namespace and how to declare a default namespace. What are the advantages and
the disadvantages of using default namespaces?
P a g e !|!10!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
Section!C:!Coding!Questions!(30!marks)!
There are 2 questions in this section. Each is worth 10 marks and 20 marks, respectively.
Candidates should answer ALL questions in this section.
Answers must be written in the space provided.
If no enough space, write on the spare pages provided at the end of the paper.
Make sure you clearly indicate the questions you are answering.!
31. (10 marks) Given the following XML document,
<?xml!version="1.0"!encoding="UTF"8"!standalone="yes"!?>!
<?xml"stylesheet!type="text/css"!href="book.css"!?>!
!
<bookstore>!
!
<message>!
!
!
<![CDATA[!
!
!
Welcome!the!WISE!Bookstore.!
!
!
]]>!
!
</message>!
!
<book!category="COOKING">!
!
!!<title!lang="en">Everyday!Italian</title>!!
!
!!<author>Giada!De!Laurentiis</author>!!
!
!!<year>2005</year>!!
!
!!<price>30.00</price>!!
!
</book>!
!
<book!category="CHILDREN">!
!
!!<title!lang="en">Harry!Potter</title>!!
!
!!<author>J!K.!Rowling</author>!!
!
!!<year>2005</year>!!
!
!!<price>29.99</price>!!
!
</book>!
!
<book!category="WEB">!
!
!!<title!lang="en">Learning!XML</title>!!
!
!!<author>Erik!T.!Ray</author>!!
!
!!<year>2003</year>!!
!
!!<price>39.95</price>!!
!
</book>!
</bookstore>!
PTO for Questions
P a g e !|!11!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
1) Write a style sheet book.css to produce a page layout looks like what’s in the screen shot;
2) Draw a document tree of this XML document.
Answer this XML Question here and on the Next page
P a g e !|!12!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
Answer this XML Question here (Cont.)
P a g e !|!13!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
!
32. (20 marks) Write a complete HTML document and an external style sheet that meets the following
requirement and produces a Web page that looks like the screenshot below.
The page is entitled “Join UWArriors” and stored in a file called join.html. It contains 5 sections as indicated
in the screenshot:
1. The Header Section: starts at (0px,!0px) and has a dimension of 874px!x!150px (width x height). This
section contains a logo (logo.gif) stored in a folder called images, which is in the same directory as
this join.html page.
2. The Vertical Navigation Section: starts at (200px,!0px) and has a dimension of 130px!x!100% (width
x height). This sections contains a group of links, which each links to home.html, team.html,
robots.html, focus.html and join.html (this page), respectively.
3. The Horizontal Navigation Section: starts at starts at (150px,!150px) and has a dimension of 724px!
x! 20px (width x height). This sections contains two hyperlinks separated by two vertical bars,
providing links to the internal sections (indicated by the dotted underline) of this page.
4. The Content Section: starts at (170px,! 150px) and has a dimension of 724px! x! 380px (width x
height). This section contains two topics, the topic headings are in H1 format. The first topic on Who
can join contains a bulleted list, the second topic on How do I join contains a form that is formatted
using a table. The options for the selection box of the form are Friends, Posters and Web!Sites.!The
form data is to be processed by!join.php!in the same folder of this file on the sever side.
5. The Footer Section: starts at (550px,!150px) and has a dimension of 724px!x!30px (width x height).
This section contains some information about the designers, for which the text is right-aligned.
Header!
Horizontal!
Navigation
Vertical!
Navigation!
Content!
Footer!
P a g e !|!14!of!18!
!School!of!Computer!Science!and!Software!Engineering!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
Note that all hyperlinks on the page has no underlines (hint: the style rule to remove underline is {text"
decoration:!none}, a link has blue colour, a visited link has gray colour, and a link with mouse hovering on it
has a yellow colour on black background.
Note also the thin border lines are just an indication of how the page is laid out. You do not need to produce
borders or underlines (except in the case of the table used for collecting form data).
Answer this Join!UWArrior Web Page Creation Question here
<!DOCTYPE!HTML!PUBLIC!""//W3C//DTD!HTML!4.01!Transitional//EN"!
!!!!!!!!!!!!"!http://www.w3.org/TR/1999/REC"html401"19991224/loose.dtd!">!
<html>!
P a g e !|!15!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
Answer this Join!UWArrior Web Page Creation Question here (Cont.)
!
P a g e !|!16!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
!
P a g e !|!17!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!
1st!Semester!Examinations!
CITS1231!Web!Technologies!!
2008!!
SPARE PAGE FOR EXTRA WORK
P a g e !|!18!of!18!
!School!of!Computer!Science!and!Software!Engineering!
!