Download Week 6 - Midterm Exam

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

URL redirection wikipedia , lookup

Cascading Style Sheets wikipedia , lookup

Transcript
Name: ________________________________
Date: __________________________
Introduction to Web Design
Midterm Exam
1. What is the difference between a start tag and an end tag?
a. An end tag starts with a forward slash.
b. They are identical.
c. An end tag is capitalized.
d. An end tag is mandatory but a start tag is optional.
2. Which is not a valid location for CSS declarations?
a. Inline
b. CSS div after the opening <body> tag
c. External Style Sheet
d. Internal Style Sheet
3. What type of content can be placed into a <td> table cell element?
a. Text only
b. Text and links only
c. Text, links, and lists only
d. Text, links, lists, and images
4. Find the mistake (circle it and state why it is incorrect):
<table>
<tr colspan="2">
<td>Row 1 Cell 1</td>
</tr>
<tr>
<td>Row 2 Cell 1</td>
<td>Row 2 Cell 2</td>
</tr>
</table>
5. What CSS technique could we use to force a <div> element to center itself horizontally in the
browser window, no matter what the screen dimensions are?
a. Set the text-align property of the <div> to center.
b. Set the right and left margins of the <div> to auto.
c. Set the screen property of the <div> to horizontal-center.
d. Set the width property of the <div> to be 50%.
Name: ________________________________
Date: __________________________
6. The key difference between HTML and XHTML is:
a. XHTML has special tags for animation.
b. You can only use CSS with XHTML.
c. XHTML is stricter in enforcing rules than HTML.
d. XHTML must be used with the current versions of web browsers.
7. If you wanted to display the actual characters <p> on your web page, which would accomplish this?
a. &lt; p &gt;
b. lt;pgt;
c. &lessthan; p &greaterthan;
d. &lt;p&gt;
8. When you move your mouse over a web link and it changes color, which CSS property has been set?
a. a:link
b. a:hover
c. a:mouseover
d. a:active
9. If you were on a web page and some of the links looked blue and some looked purple, what is the
most likely explanation for this?
a. The web designer styled some links to be blue and others to look purple.
b. The links that are in purple are dead or inactive.
c. The purple links are sites that you have already visited.
d. The browser is having a problem and needs to be closed and restarted.
10. Which is the preferred way to italicize text in your web page?
a. The <em> element
b. By using font-style: italic; in CSS
c. The <i> element
d. The <ital> element
11. Which of the following is not true about XHTML comments?
a. They can be read by anyone who views the source code in their browser.
b. They help web designers understand other designers’ code.
c. They are required for closing <div> tags to indicate which <div> is being closed.
d. They can span multiple lines without causing errors.
12. What will happen if we use CSS to set both a background image and a background color for the same
element?
a. The background image will show with a border around it in the background color.
b. The background image and the background color will be blended and both will show.
c. Only the background color will show.
d. Only the background image will show, unless the image cannot be found, in which case the
background color will show.
Name: ________________________________
Date: __________________________
13. Why is the .gif format such a poor choice for a photographic image?
a. It has limited color support.
b. It results in a much larger file than other formats.
c. It isn't supported by many browsers.
d. It is reserved solely for cartoon animations.
14. Which of the following can we use to indicate that the cells in the first row of a table are labels for the
data below and should be formatted differently?
a. <td special>
b. <td first>
c. <th>
d. <table header>
15. Which is not a direct benefit of using CSS?
a. Gaining more control over how we style our web pages
b. The ability to make multiple changes to a website from a single location
c. The ability to place tables and images into our web pages
d. Separating the content of our web pages from its presentation
16. If you wanted to add a footnote reference like this1 to a word, which element would you use?
a. <foot>
b. <sup>
c. <up>
d. <sub>
17. Place the following in the order in which they would appear in an XHTML document (order 1-6):
____
____
____
____
____
____
</head>
<title>
</html>
DOCTYPE
<body>
<p>
18. Write the CSS code to make all <h2> headings display centered and in green:
Name: ________________________________
Date: __________________________
19. Write the XHTML code to create a link to the file newpage.html with link text of New Page:
20. Write the CSS code to create a new class called 'newclass'. Define the dimensions as 300 by 300
pixels with 10 pixels of padding on all sides:
21-25. Identify the five mistakes in the following code. Circle them and note what is incorrect about them.
1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3.
<title>Company Website</title>
4.
<head>
5.
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
6.
<style type="text/css">
7.
a:link {
8.
color: blue;
9.
}
10.
a:visited {
11.
color: red;
12.
}
13.
.class1 {
14.
bgcolor: yellow;
15.
}
16.
</style>
17.
</head>
18.
<body>
19.
<div class="class1">
20.
<h1>Company Website:</h1>
21.
<p>
22.
<a href="http://www.reedjones.com" target="blank">Reed & Jones</a>
23.
</div>
24.
</p>
25.
</body>
26. </html>
Name: ________________________________
Date: __________________________
Introduction to Web Design
Midterm Exam Answer Key
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
A
B
D
colspan should be in the <td> element, not the <tr> element
B
C
D
B
C
B
C
D
A
C
C
B
17. 3,2,6,1,4,5
18.
h2 {
text-align: center;
color: green;
}
19. <a href="newpage.html">New Page</a>
20.
.newclass {
width: 300px;
height: 300px;
padding: 10px;
}
21-25.
a. Line 3: <title> element should be inside the <head> element
b. Line 14: bgcolor should be background-color
c. Line 22: target="blank" should be target="_blank"
d. Line 22: Reed & Jones should be Reed &amp; Jones
e. Line 24: </p> is outside the containing <div>