MIDTERM A -- Review Questions -- Winter 2007 Answers are included. Part A. Definitions. Browser - Obtains web pages from a server and displays them. Text Editor - a program for creating and editing text files. Examples are NotePad, WordPad, TextPad or PSPad. Server - A computer or device on a network that manages network resources such as web pages. Host - A computer system that is connected to the Internet. Packet Switching - A method of transmitting data over the Internet in which messages are divided into packets before they are sent. Each packet is then transmitted individually and can even follow different routes to its destination. Once all the packets forming a message arrive at the destination, they are assembled to reproduce the original message. DNS - Short for Domain Name System (or Service or Server). An Internet service that translates domain names into IP addresses. ARPANET - The precursor to the Internet, ARPANET was a large network created by the United States Defense Advanced Research Project Agency (ARPA). Established in 1969, ARPANET served as a testbed for new networking technologies, linking many universities and research centers. Bit - Short for binary digit, the smallest unit of information on a computer. The term was first used in 1946 by John Tukey who was a mathematician and statistian at Princeton. A single bit can hold only one of two values: 0 or 1. Protocol - An agreed-upon format for transmitting data between two devices. Two common protocols are http and ftp. HTML Tag - A command delimited by angle brackets specifies how the document, or portion of the document, should be formatted. Examples of HTML start tags: <body> Examples of HTML end tags: </html> </head> Attribute - Additional information added to an HTML tag that specifies how the tag will behave. Examples of HTML attributes: style src href border cellpadding class. Inline Style CSS - A style that is specified as an attribute added. to an HTML tag. This kind of style only applies to this one tag. Document-level Style - A style that is specified in the head. section of the page. Style that modify elements (tags) here apply to every tag in the document. CSS Element - The HTML tag to which the document-level style is being applied. Examples: body p h1 span CSS Property - The part of the style that is being defined. Examples: color background-color font-family font-weight CSS Value - The exact behavior of the property that is chosen Examples: red Arial bold 120%. CSS elements, properties and values come in triples with this syntax: element { property1: value1; property2: value2; } Directory - another name for folder. Parent Folder - Refers to the folder above the current folder. The depth of the parent folder is one less than the depth of the current folder. Sibling Folder - Sibling folders are folders with the same parent folder. Home Folder - the folder containing mail and public_html. Part B. Short Answers. 1. For what purpose was HTML invented? Ans: To display scientific papers on the internet. 2. Who lead the team that invented the transistor? Ans: Shockley 3. Why is John Von Neumann important in the history of computers? Ans: He realized the advantages of storing both data and computer instructions as binary data. 4. What does a DNS server do? Ans: It translates a logical URL into an IP address. 5. For which invention is Tim Berners-Lee noted? Ans: His team invented HTML at CERN. 6. Explain how to download an HTML file from students.depaul.edu. Ans: In a browser: Right click > Save As > HTML Using SSH: Drag the file from the right (server side) to the left (Local PC side). 7. You upload an HTML web page to the server and try to view it with a browser, but nothing appears. List some possible reasons. Ans: You might (a) not have saved the page in PSPad after editing it. (b) not have refreshed the page after uploading it. (c) have spelled public_html incorrectly. (d) not have uploaded the page into the public_html file. (e) have forgotten the tag. (e) have forgotten the tag. (f) have omitted the closing or the closing >. (g) have the double version problem: you are editing one version and uploading a different version. (h) The permissions for the page or folders containing it are incorrect. 8. Why are file permissions important for web pages displayed on a server? Ans: It is important for anyone that wants to view a web page to have read permission for that page, but only the owner should have write permission so that others cannot alter you web pages. 9. What are the delimiting tags for an HTML page? Ans: and 10. Which HTML tag denotes a linebreak? Ans:
11. What does mean? Ans: Bold 12. Write code to display the web page title My Web Page. Ans: My Web Page shows My Web Page in the title bar of the browser. To display this text as a heading at the top of the page, use

My Web Page

. 13. How do you make an image clickable? Ans: Put an image in a hyperlink like this: 14. Which file format is best for photographs? Ans: .jpg is best for photos, .gif is best for for computer images that have large regions of constant color. 15. What is the term for extracting a rectangular subimage from an image. Ans: Cropping 16. What items go in the head section of an HTML page? Ans: title meta style 17. What does   mean? Ans: Nonbreaking space that cannot be eliminated by the browser. Part C. Problems. Show your work for each problem. 1. How is the following HTML code displayed in the browser? >table border="2"< Ans: >table border=2< 2. Write an image tag that displays the image dog.jpg in the images folder. The images folder is a child folder relative to the current folder. Ans: 3. Redo Problem C assuming that the images folder is a sibling folder, relative to the current folder. Ans: 4. How would you get the following text to display in a browser? All's well that ends well. Ans:

All's
well
that
ends
well

5. Write an absolute address tag with link text Disney Web Site and address www.disney.com. Ans: Disney Web Site 6. Write a span tag with an inline style that displays the word Rumplestiltskin with these specifications: a) Helvetica font b) Dark green text color c) Font size 80% of normal d) Underlined e) Boldfaced Ans: Rumplestiltskin 7. Write a document-level style that sets the style for the each paragraph of an HTML page with these specifications: a) Arial font b) Blue text color c) 10 point font size d) Background color beige e) First line indented by 10 millimeters Ans: 8. What is displayed by the following source code in the browser?
b r w
m x u
q y a
Ans: b r w m x u q y a 9. Write a document-level style that makes all table cells 2 centimeters wide. Abs: td { width: 2cm } 10. Write HTML code that places the images dog.jpg and cat.jpg into a table with one row. Ans:
11. Redo Problem 11 with a table that places the images in one column. Ans:
Part D: Write Hyperlinks and Image Tags Here is the navigation architecture for Problems 1 and 2. 0 public_html 1 a.htm 1 b.htm 1 c 2 d.htm 2 e.htm 2 f 3 g.htm 3 cat.jpg 1. Write hyperlinks according to the following specs: Current Page Target File Hyperlink Text ============ =========== ============== e.htm a.htm To Page A a.htm b.htm To Page B g.htm e.htm To Page E g.htm b.htm To Page B Ans: To Page A To Page B To Page E To Page B 2. Write image tags according to the following specs: Current Page Image File ============ ========== d.htm cat.jpg g.htm cat.jpg Ans: