Solutions
This assignment deals with lecture material covered in class during the first four class meetings. Review your class notes, consult chapters 1-3 of the textbook, and answer the following questions:
-
List the names of web servers, and tell which operating systems each runs on.
Server Operating Systems Apache All IIS Windows only -
List the names of four web browsers, and tell which operating systems each runs on.
Browser Name Operating Systems Internet Explorer Windows only Google Chrome All Firefox All Opera All -
What is an IP Address?
An IP address is a number that uniquely identifies each computer connected to the Internet. The Internet is in the process of migrating from IPv4, which uses 32-bit addresses (4 billion different numbers) to IPv6, which uses 128-bit addresses (there is no name for how large that number is: it is approximately 1038).
-
Use the terms, “client,”, “server,” “request,” “response,” “IP address,” and “header” to tell how two
computers can exchange messages using the Internet.
- A server program that is always running on a computer with a static IP address (one that never changes) tells it’s operating system that it will process messages sent to a particular port number on that computer.
- A client program running on either the same computer or, more commonly, any other computer connected to the Internet constructs a request message that has a header part containing the server’s IP address and port number plus its own IP address and port number.
- The client’s operating system sends the request message to the Internet, which delivers it to the server’s computer.
- The operating system on the server delivers the request message to the correct program, based on the server port number in the header of the request message.
- The server program examines the information in the body of the request message, and constructs a reply message. The IP address and port number of the client program are used as the destination address in the header of the reply message.
- The server’s operating system sends the reply message to the Internet, which delivers it to the client computer.
- The client computer’s operating system delivers the reply message to the client program based on the port number in the message header.
-
What is a “port number,” and what is the standard port number used by web servers?
I just explained port numbers in the previous answer! The standard server port number for web servers is 80 (http), but others can be used. The standard port number for encrypted communication with a web server is 443 (https).
-
Is '\' a “forward slash” or is it a “backward slash?”
It is a backward slash. In Unix-based systems like Linux and Macintosh OS X, it is used as an “escape” character inside text strings.
-
In the path,
C:\Users\abcd1234\My Documents\My Website\flower.jpg
:- Is
abcd1234
a directory, or is it a file?It is definitely a directory because it is in the middle of a Windows path.
- Is
flower.jpg
a directory, or is it a file?It could be either because it is the last element in the path. It looks like a file name because
.jpg
is a commonly used extension for image files. But there is nothing to prevent someone from creating a directory with that name.
- Is
-
What kind of slashes (forward or backward) are used to separate the elements of a pathname on the Internet?
Forward slashes. Windows users sometimes get confused because if they type backslashes in URLs, the browser will silently convert them to forward slashes automatically.
-
What is the root of the file tree in the previous example?
The root is “C:\”—the top-level directory on this Windows computer’s C drive.
-
Select the one best letter from the following list to identify each of the items below.
- A start tag
- An end tag
- A self-closing tag
- An XHTML element
- The content of an element
- An attribute
- An attribute name
- An attribute value
-
<p>This is a paragraph.</p>
An HTML element.
- This is a Paragraph.
The content of an element
-
<img src="images/flower.jpg" alt="A rose is a rose" />
An HTML element; it is also a self-closing tag.
-
alt="A rose is a rose"
An attribute
-
alt
The name of an attribute
-
"images/flower.jpg"
The value of an attribute
-
<div>
A start tag
-
Each of the following items is not valid XHTML code. For each one, tell what is wrong and a
possible way to make it valid.
-
<p>This is a paragraph.
The end tag (
</p>
)is missing. -
<p class=special>This is a special paragraph</>
The quotes around the attribute value (special) are missing, and the tag name (p) is missing from the end tag.
-
<P>There is something wrong with this paragraph!</P>
XHTML does not allow uppercase tag names: change the
P
's to lowercase. -
<div><p>This is the first paragraph in this div.</p> <p>This is the second one.</div></p>
The last two end tags are reversed, so the elements are not properly nested.
-
<img src="images/flower.jpg" alt="A rose is a rose">
This should be a self-closing tag with a / before the >
-
-
What is the tag name of the root element of any XHTML web page?
html