IT 130 -- Midterm Exam
April 24, 2008
Part A: Short Answer Questions. Insure that all of the HTML code that you
write is XHTML complent.
1. (3 pts.) Show the XHTML tag that represents a linebreak.
Ans:
2. (10 pts.) List four differences between HTML and XHTML.
Ans:
a. Every XHTML tag requires a matching end tag.
b. Tags must be nested.
c. Combination start/end tags are allowed. (Like
.)
d. Double quotes are needed for attribute values.
3. (3 pts.) Where does the
tag go on an HTML page?
Ans: Between the and tags.
4. (3 pts.) Where does the browser display the title created in Problem 4?
Ans: In the left side of the title bar of the browser.
5. (3 pts.) What are file permissions?
Ans: File permission determines who is allowed to read that file
over the web or who can write to it or delete it. Permission
for a folder determines who can read a file contained in it,
who can add a file to it or modify files in that folder.
If a user has execute permission for a folder, he or she can
get a directory listing of all the files or subfolders in that
folder.
6. (5 pts.) Why are file permissions important for a website hosted on a
server?
Ans: You want everyone to have read permission so that they can view
the file with a browser over the internet. You want only the
owner to have write permission so that he or she can make changes,
but you don't want anyone else to be able to make changes.
You want folders to have execute permission so the professor can
get a directory listing of your files.
7. (3 pts.) Who is credited with inventing HTML?
Ans: Tim Berners-Lee.
8. (3 pts.) Where and why was HTML invented?
Ans: At CERN (Conseil Europeen pour la Recherche Nucleaire) for the
posting of scientific papers.
9. (3 pts.) Why are uppercase letters and space characters not a good idea in
web pages and images that will be uploaded to the server.
Ans: Because the server is case sensitive, whereas browsers viewing
files on the PC are not. If you make a capitalization mistake on
the PC, you may not notice it until you upload the webpage.
If you embed a space in a filename, you will need to put %20 to
represent that space in the hyperlink reference.
10. (3 pts.) Who is credited with inventing packet switching?
Ans: Leonard Kleinrock.
11. (3 pts.) Why is packet switching important for the modern internet?
Ans: Sending small packets of data of size 1K is more efficient and
faster than maintaining a dedicated line for the transfer.
12. Duplicate question.
Page 2
13. (3 pts.) What do the HTML special symbols and > mean?
Ans: Non-breaking space and right angle bracket (less than sign or >).
14. (3 pts.) In the following document-level style, identify the element,
the property and the value.
h1 { font-family: Papyrus; }
Ans: h1 is the element, font-family is the property, Papyrus is the value.
15. (8 pts.) Explain the role of each of these software products in the
process of editing, uploading and testing a website on a server.
a. PSPad Ans: Used to edit HTML files.
b. SSH Ans: Used to upload files to the server. Can also be used to
download files. Caution: Don't use for testing.
c. Internet Explorer Ans: Used to view uploaded files on the server.
Page 3
The following navigation architecture applies to questions 12, 13, 14 and 15.
0 public_html
1 intro.htm
1 banner.gif
1 cats
2 lions.htm
2 tigers.htm
1 primates
2 apes.htm
2 chimpanzees.htm
1 countries
2 kenya.htm
2 india.htm
1 images
2 tiger.jpg
2 chimpanzee.jpg
12. (3 pts.) Write a hyperlink tag that jumps from the current page intro.htm
to the target page kenya.htm.
Ans:
13. (3 pts.) Write a hyperlink tag that jumps from the current page india.htm
to the target page tiger.htm.
Ans:
14. (3 pts.) Write an image tag that displays the image tiger.jpg on the
current page intro.htm.
Ans:
15. (3 pts.) Write an image tag that displays the image banner.gif on the
current page apes.htm.
Ans:
16. (10 pts.) Write a document-level style that does the following:
Sets the background color of the body to azure, the text
color of the body to navy, the font to italic Forte, the
font size to twice as large as normal.
Ans:
Page 4
17. (15 pts.) Correct the errors in the following source code to make it
XHMTL compliant.
My Web Page
This is the first sentence on this page.
This is the second sentence on this page.