IT 4239 HTML

Mid-Term Exam Answers

April 26, 2004

 

You can see a further explanation of the answer to multiple-choice questions by moving your cursor over the blue checkbox or lit radio button. A small window will open up with the comments. For example, move your cursor over the blue checkbox here --> See?

The exam is one hour. You can take a bit more tim, but be reasonable. Read all questions before starting.

Multiple choice questions are indicated by a list of possible answers following the question. Each possible answer is preceded by a check box.

Some questions will require a word, descriptive phrase, or text answer. You are limited in the amount of space you have for your answer. If you run out of space, write something shorter.

Remember that Shakespeare said, "brevity is the soul of wit". All answers are to be made on this exam. Please keep written answers short. There are no essay questions.

Each question or part is worth about 3 points. Good luck.

Your name (required) : _______________________________________________

Your email address (required) : _______________________________________________

Your student id (required) : _______________________________________________

START

 

Question 1

Give definitions for the following terms and acronyms:
 
HTML  HyperText Markup Language
URL Uniform Resource Locator
GIF Joint Photographic Experts Group
GIF Graphic Interchange Format

 

Question 2

What are the 2 main sections of a web page?

<head> and <body>

 

Question 3

What ends the <BODY> section?

</body>

 

Question 4

What is the current specification level of HTML?

 2
 3
HTML 4.0 4

 

Question 5

HTML was developed to have a cross-platform way of displaying data. Therefore, a page you create will display the same way on all browsers; true or false?

 True    There can be variations in image borders, font face, font size, personalized fonts and colors, table cell outlines, and special commands specific to a particular browser False

 

Question 6

If you specify Arial font for a block of text, all browsers will display the text in an Arial font; true or false?

 True    Of Arial font is not available on the client system, the browser cannot display it and will substitute another font False

 

Question 7

What happens if you specify Arial font and the viewing browser doesn't have Arial installed?

The browser will substitute the default font.

 

Question 8

If the following text is in your source code, typed exactly like this, how will this text be displayed?

===========

T'was Brillig and the slithy toves
Did gyre and gimbal in the groves
All    mimsy    were   the
                            borogroves
And the mome raths outgrabe

- Lewis Carroll

===========

T'was Brillig and the slithy toves Did gyre and gimbal in the groves All mimsy were the borogroves And the mome raths outgrabe - Lewis Carroll

It will all run together and display as a continuous line. The extra spaces will disappear.

 

Question 9

What command, if any, would you put at the end of each line to have them display correctly?

<br>

 

Question 10

To display the poem text in Arial font, what command would you use before the poem text?

<font face="arial">

 

Question 11

What command, if any, would you use at the end of the poem text before the author?

</font>

 

Question 12

You would like the text of the poem to display in red. What command would you use to do that?

<font color="red">

 

Your web page, page01.htm, is hosted in a folder at a server. The folder and file structure is

    ...
    your-home-folder
      images-folder
        image01.gif
      text-folder
        page01.htm
        image02.gif

 

In addition, there is a nifty graphic you saw at www.neatgraphics.com on their home page, which is index.htm. The graphic is in the same place as the page and is called neat.jpg.

You want to display all three images on your page.

Question 13

What command do you use for image01?

<img src="../images-folder/image01.gif">

 

Question 14

What command do you use for image02?

<img src="image02.gif">

 

Question 15

What command do you use for neat?

<img src="http://www.neatgraphics.com/neat.jpg">

 

Question 16

image01.gif is a cool image, but, at 360 pixels wide, it is too big. What command do you use to display the image half its normal size?

<img width="180" src="../images/image01.gif">

 

Question 17

There is some text preceding image01.gif. If you don't specify, will the text align itself with the top of the image, the middle, or the bottom?

 Top     Middle    Use ALIGN= to change where the text goes use the ALIGN attribute Bottom

 

Question 18

You are using a large font. When developing your text on a machine with 1024x768 resolution the line displays as:

THIS IS VERY BIG TEXT

and just fits nicely on the screen in one line. What happens when the line is viewed on a machine with standard VGA resolution of 640x480 pixels?

 The text scrolls off-screen to the right
 The text wraps to the next line
 The text is truncated
 The text is made smaller by the browser and still fits correctly

 

Question 19

In the text of your document, you have the phrase "friendly lawyer". You want to make sure that these two words are always together and never get separated by a line break. How do you enter it as text?

Friendly&nbsp;lawyer

 

Question 20

You are creating a page that will look somewhat like a newsletter. You have some text that you would like to have in 2 columns, like a newspaper article. What command can you use that will automatically flow the text from one column to the next?

<multicol cols=2>
However, this tag is valid only for Netscape. For any other browser, you would have to use <table>, but then the text would not flow automatically.

 

A link is a clickable object that will transfer the viewer to someplace else.

Question 21

What command would you use to transfer the user to www.yahoo.com if they click on the text "click here"?

<a href="http://www.yahoo.com">click here</a>

 

Question 22

What command would you use to transfer the user to a local file called foo.htm if they click on the text "click here"?

<a href="foo.htm">click here</a>

 

Question 23

What command would you use to transfer the user to another spot on the same page called "clicked" if they click on the text "click here"?

<a href="#clicked">click here</a>

 

Question 24

What command would you use to identify the spot called "clicked" in your page?

<a name="clicked">

 

Question 25

You want the viewer to be able to click on an image to go to www.yahoo.com. You have a graphics file called yahoo.gif in your local folder. What command do you use?

<a href="http://www.yahoo.com/"> <img src="yahoo.gif"> </a>

 

You have the following list items:

<li> item a
<li> item b
<li> item c

Question 26

How will they display if preceded by the <ul> command?

n item a
n item b
n item c

They will be listed with bullets.

 

Question 27

How will they display if preceded by the <OL TYPE=A>command?

A. item a
B. item b
C. item c

They will be listed with capital letters in order by A, B, C

 

Question 28

How will they display if preceded by the <OL TYPE=1>command?

1. item a
2. item b
3. item c

They will be listed with numbers in order 1, 2, 3