=========================preview======================
(comp101)[2005](f)midterm2~masze^_10094.pdf
Back to COMP101 Login to download
======================================================
For questions 1 to 14, please use pencil to fill the circle on the answer sheet that represents the best answer (4 points for each question).

1. What does the browser do for the text between the <a> and the </a> tags?



A. It uses the text as URL for the intended link.
B. It uses the text to link to the URL if clicked.
C. It displays the text in blue so that people would know that it is a link.
D. It displays the text underlined so that people would know that it is a link.

2. What does the browser do when it encounters the tag <tr bgcolor="#BB00BB">?



A. It sets the background color of the browser window to purple.
B. It sets the background color of the table to purple.
C. It sets the background color of the table row to purple.
D. It sets the background color of the table cell to purple.

3. You entered http://course.cs.ust.hk/comp101/ as URL for the browser. Which file on the Web server is displayed?



A. comp101.html
B. course/comp101.html
C. comp101/index.html
D. course/index.html

4. You wish to display in the browser window two lines of text exactly like the example below:



The quick brown fox jumps
over a lazy dogs back.




Which of the following tags should be used to enclose the text?
A. <blockquote>
B. <format>
C. <pre>
D. <style>

5. The <style> tag in an HTML file is used to control the format style of the text
A. enclosed between <style> and </style> tags.
B. enclosed between <head> and </head> tags.
C. enclosed between <body> and </body> tags.
D. in all HTML documents that link to this style sheet.

6. It is a good idea to specify width and height of an image in an HTML file since



A. the image may be distorted if its width and height are not specified.
B. the image may load faster if it is given a smaller width and a smaller height than its original dimensions.
C. the image may be expanded or compressed to fill the reserved space while keeping the original sharpness (in pixels per inch).
D. the browser will reserve the space needed for the image before it is loaded.

7. The style attribute in a <li> tag is used to control the format style of the text



A. enclosed between <li> and </li> tags.
B. enclosed between <style> and </style> tags.
C. enclosed between <head> and </head> tags.
D. enclosed between <body> and </body> tags.
8. Many modern digital cameras can take photographs in 5 million pixels or more. How many pixels should you set if the purpose of taking the photograph is to post it on the Web?



A. 5 million since that gives the sharpest image on the computer screen.
B. 2 million since most display screens today can display at least 2 million pixels.
C. 0.5 million since it is unlikely that the image will fill the whole browser window.
D. 0.1 million since the image can use Web-safe colors only.

9. For an HTML document to use an external style sheet called p