HCI201 Midterm Exam

There are 30 multiple choice/true-false questions.
On your answer table, mark exactly one choice for each question.

1.  We can use   to insert an extra space between words in an HTML file:

a)  True    b)  False

2.  CSS is a newer version of HTML.

a)  True    b)  False

3.  Internet Explorer, Firefox, Safari, and Crome are all examples of:

a)  CSS attributes
b)  HTML tags
c)  Internet browsers
d)  Windows editors

4.  In order to view any of your webpages on the internet, they must

a)  be in your HCI201 folder
b)  be in your public_html folder
c)  have the file extension .html
d)  all be in the same folder

5.  <p style="text-align: right"> is an example of

a)  using a character entity
b)  using an internal style rule
c)  declaring the data type of a paragraph
d)  using an inline style rule

6.  According to XHTML, the proper way to cause the browser to display a horizontal rule is

a)  <hr ʙ>
b)  <hr>
c)  <hspace="hr">
d)  <hr />

7.  The alt attribute:

a)  must appear within the <img> tag
b)  is an attribute of the <table> tag
c)  is used to cause text to be displayed when a user mouses over an image
d)  creates an alternative image to be displayed when the user clicks on the original image

NEWS FLASH: The toilets at a local police station have been stolen. Police say they have nothing to go on.
8.  The <title> tag goes inside:
a)  the body container
b)  the index container
c)  the head container
d)  the style container

9.  What is the correct HTML for inserting an image?

a)  <img src="image.gif" />
b)  <img>src="image.gif"</img>
c)  <img href="image.gif" />
d)  <img alt="image.gif" />

10.  Every element has an opening and closing tag. For example, <p>...</p>.
Identify two HTML elements that combine the opening and closing tag into one single tag.

a)  <a> and <link>
b)  <quot> and <img>
c)  <link> and <hr>
d)  <br> and <li>

11.  CSS style rules for web documents can be defined:

a)  within style tags between <rule> and </rule> in the HTML document
b)  between <title> and </title> in the html document
c)  in an external .css file
d)  all of the above

12.  Writing <img style="float: right" src="otis.jpg" /> in an html document causes text to:

a)  print to the left of the image and wrap around it
b)  print to the right of the image and wrap around it
b)  print over the image
d)  print at the bottom of the image

13.  Where does text between <title> and </titie> appear when an HTML document is displayed?

a)  in the status bar at the bottom of the screen
b)  in the first line of the content at the beginning of the display
c)  in the title bar at the top of the screen
d)  in the address bar of the browser

14.  The <strong> tag:

a)  does not have a closing tag
b)  is used to make text larger
c)  is used to make text bold
d)  is only used in the <head> portion of a file



For questions 15, 16, 17, and 18
    public_html    
    zeipp    
  movies    HCI201  
images       images
A student by the name of Scuttle Zeipp has a students account.
His folders are structured as given on the right. Scuttle has two HTML files (onehour.htm and hw3.htm)
and two image files (me.jpg and gun.jpg). onehour.htm is in his movies folder, hw3.htm is in his HCI201
folder, me.jpg is in his images folder under HCI201, and gun.jpg is in his images folder under movies.

15.  Scuttle is editing his hw3.htm file and wants to display his me.jpg image. Which is correct:

a)  <img src="me.jpg" />
b)  <img src="images/me.jpg" />
c)  <img src="../me.jpg" />
d)  <img href="me.jpg" />

16.  Scuttle is editing his hw3.htm file and wants to display the page onehour.htm. Which is correct:

a)  <a href="movies/onehour.htm">
b)  <a href="http://movies/onehour.htm">
c)  <a href="../../onehour.htm">
d)  <a href="../movies/onehour.htm">

17.  Scuttle wants to use the gun.jpg image as background to his hw3.htm page. In his hw3.htm file he should:

a)  put <img src="../movies/images/gun.jpg" /> between <style> and </style>
b)  define the style rule:   body {background-image: <img src="images/gun.jpg" />}
c)  define the style rule:   body {background-image: url(../movies/images/gun.jpg)}
d)  put <img src="@@/images/gun.jpg" /> just below the <body> tag

18.  It is not possible for Scuttle to create any more folders named images, in his students account.

a)  True    b)  False

NEWS FLASH: A women was found dead in her home today! She was discovered in her bath tub which was filled with milk and cornflakes. Police suspect a cerial killer!
19.  If the HTML code <img src="../pictures/msh.gif"> appears in a file phone.htm, then
a)  the file phone.htm must be in the parent folder of pictures
b)  the file msh.gif is in a folder one level up from the folder containing phone.htm
c)  the file phone.htm must be in the pictures folder
d)  the file phone.htm must not be in the pictures folder

20.  What is the correct HTML for making a hyperlink?

a)  <a href="http://www.dogsite.com">Dog Site</a>
b)  <a www.dogsite.com</a>
c)  <a nameref="http://www.dogsite.com">Dog Site</a>
d)  <a href="url:\\www.dogsite.com">Dog Site</a>

21.  Using CSS, we can make a list with square bullets by first defining the class sqr, like this:

and then using the class definition, like this
a)  <ul class="sqr">
b)  ul.list-style-type
c)  <ul style="sqr">
d)  <ul.sqr>

22.  To specify the start of a new list item, we use which tag:

a)  <list-item>
b)  <ul>
c)  <ol>
d)  <li>

23.  Consider the following file extensions:   (1) .css   (2) .htm   (3) .html   (4) .doc
For an HTML file, which extensions are allowed:

a)  (1), (2), and (3)   b)  (3) only   c)  (2) and (3)   d)  all of them are allowed

24.  SSH is software designed to be used for viewing and editing HTML files:

a)  True    b)  False

25.  If we write   <p style="text-align: top; color: green">Think Green</p>
in an HTML document, then the words Think Green will be displayed at the top of the screen.

a)  True    b)  False

26.  How would the CSS style rule h2 { font-family:Arial } be written if we wrote it inline.

a)  h2 = "font-family:Arial"
b)  <h2 style="font-family:Arial">
c)  <h2 font-family=Arial>
d)  <h2> css="font-family:Arial"

27.  To format an HTML page using CSS styles in an external file called stylesheet.css, we include this tag:
<link rel=stylesheet type="text/css" href="stylesheet.css" />.   Where is the tag included:

a)  in the body section of the HTML file
b)  in the style section of the HTML file
c)  in the head section of the HTML file
d)  in the script section of the HTML file

NEWS FLASH: Police arrested 2 kids yesterday: 1 was drinking battery acid the other was eating fireworks.They charged one and let one off.
28.  What are the dimensions (#rows x #columns) of this table
<table><tr><td>100</td></tr> <tr><td>200</td></tr> <tr><td>300</td></tr> </table>?
a)   2 x 2
b)   1 x 3
c)   2 x 1
d)   3 x 1

29.  The <tr> tag

a)  defines a standard cell in a table
b)  defines a new row in a table
c)  is used in conjuction with <hr> to specify a type definition
d)  none of the above

30.  The text "CDM" can be colored red using:

a)  <color="red">CDM</color>
b)  <span style="color: red">CDM</span>
c)  <span style="bgcolor: red">CDM</span>
d)  <color style="text-color: red">CDM</color>

BONUS QUESTION