Midterm Exam Review
Midterm Exam Review
MIDTERM EXAM REVIEW
Which property determines the font (e.g. Arial, Tahoma) a
text element is displayed in?
a.text-family
b.font-style
c.font-family
d.text-type
MIDTERM EXAM REVIEW
Where is an internal style sheet located?
a. In a separate file from the XHTML document
b. In the <body> section of the XHTML document
c. In the <head> section of the XHTML document
d. In the <title> section of the XHTML document
MIDTERM EXAM REVIEW
Where is an internal style sheet located?
a. In a separate file from the XHTML document
b. In the <body> section of the XHTML document
c. In the <head> section of the XHTML document
d. In the <title> section of the XHTML document
MIDTERM EXAM REVIEW
What will happen if we do not specify the border attribute for
a <table> element?
a. There will be an error and the table will not display.
b. The table will show the default value of 1 pixel cell borders.
c. The browser will ask the user to supply a border size.
d. The table will show without any cell borders.
MIDTERM EXAM REVIEW
What will happen if we do not specify the border attribute for
a <table> element?
a. There will be an error and the table will not display.
b. The table will show the default value of 1 pixel cell borders.
c. The browser will ask the user to supply a border size.
d. The table will show without any cell borders.
MIDTERM EXAM REVIEW
The correct syntax for using a colspan attribute in an
XHTML document is:
a.<td colspan:3>
b.<td colspan="3">
c.<td colspan=3>
d.<td colspan=100%>
MIDTERM EXAM REVIEW
The correct syntax for using a colspan attribute in an
XHTML document is:
a.<td colspan:3>
b.<td colspan="3">
c.<td colspan=3>
d.<td colspan=100%>
MIDTERM EXAM REVIEW
What does CSS stand for?
MIDTERM EXAM REVIEW
What does CSS stand for?
MIDTERM EXAM REVIEW
Which are all valid table elements?
a.<tr>, <tc>, and <table>
b.<td>, <row>, and <table>
c.<tr>, <th>, and <table>
d.<cell>, <row>, and <table>
MIDTERM EXAM REVIEW
Which are all valid table elements?
a.<tr>, <tc>, and <table>
b.<td>, <row>, and <table>
c.<tr>, <th>, and <table>
d.<cell>, <row>, and <table>
MIDTERM EXAM REVIEW
MIDTERM EXAM REVIEW
MIDTERM EXAM REVIEW
Which element is used to define a column?
a.<td>
b.<tr>
c.<tc>
d.<col>
MIDTERM EXAM REVIEW
Which element is used to define a column?
a.<td>
b.<tr>
c.<tc>
d.<col>
MIDTERM EXAM REVIEW
If we applied the CSS style {padding: 10px 0px;} to a div
element, what would happen?
a. 10 pixels of padding would be added to the top and bottom of
the div.
b.10 pixels of padding would be added on all sides of the div.
c. 10 pixels of padding would be added to the right and left of the
div.
d.10 pixels of padding would be added to the bottom of the div.
MIDTERM EXAM REVIEW
If we applied the CSS style {padding: 10px 0px;} to a div
element, what would happen?
a. 10 pixels of padding would be added to the top and bottom of
the div.
b.10 pixels of padding would be added on all sides of the div.
c. 10 pixels of padding would be added to the right and left of the
div.
d.10 pixels of padding would be added to the bottom of the div.
MIDTERM EXAM REVIEW
How would you create a link to another web page named
"page2.html"?
a.<a ref=page2.html>Link to Page 2</a>
b.<a href="page2.html">Link to Page 2
c.<a href="page2.html">Link to Page 2</a>
d.<a>Link to Page 2</a>
MIDTERM EXAM REVIEW
How would you create a link to another web page named
"page2.html"?
a.<a ref=page2.html>Link to Page 2</a>
b.<a href="page2.html">Link to Page 2
c.<a href="page2.html">Link to Page 2</a>
d.<a>Link to Page 2</a>
MIDTERM EXAM REVIEW
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.
MIDTERM EXAM REVIEW
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.
MIDTERM EXAM REVIEW
If a div has a defined width of 200px, a border of 5px,
padding of 10px, and a margin of 5px, what would
be the overall width taken up by the div element on
the screen?
a. 200px
b. 205px
c. 220px
d. 240px
MIDTERM EXAM REVIEW
If a div has a defined width of 200px, a border of 5px,
padding of 10px, and a margin of 5px, what would
be the overall width taken up by the div element on
the screen?
a. 200px
b. 205px
c. 220px
d. 240px… 200 + 5 + 5 + 10 + 10 + 5 + 5 = 240
MIDTERM EXAM REVIEW
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
MIDTERM EXAM REVIEW
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
MIDTERM EXAM REVIEW
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.
MIDTERM EXAM REVIEW
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.
MIDTERM EXAM REVIEW
If we floated one div to the right and another to the
left, where would the next page content display on
the page?
a. In between the two divs, in all circumstances
b. In between the two divs, but only if there is
sufficient space
c. Beneath the div on the right
d. Beneath the div on the left
MIDTERM EXAM REVIEW
If we floated one div to the right and another to the
left, where would the next page content display on
the page?
a. In between the two divs, in all circumstances
b. In between the two divs, but only if there is
sufficient space
c. Beneath the div on the right
d. Beneath the div on the left
MIDTERM EXAM REVIEW
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.
MIDTERM EXAM REVIEW
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.
MIDTERM EXAM REVIEW
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.
MIDTERM EXAM REVIEW
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.
MIDTERM EXAM REVIEW
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>
MIDTERM EXAM REVIEW
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>
MIDTERM EXAM REVIEW
How many times can a CSS class be applied to
elements in an XHTML document?
a. Once
b. Twice
c. Once for each type of element in the page
d. An unlimited number of times for each type of element
in the page
MIDTERM EXAM REVIEW
How many times can a CSS class be applied to
elements in an XHTML document?
a. Once
b. Twice
c. Once for each type of element in the page
d. An unlimited number of times for each type of element
in the page
MIDTERM EXAM REVIEW
CSS classes and IDs are defined by which
starting character, respectively, in the <style>
section?
a. Colon and period
b. Period and pound sign
c. Pound sign and period
d. Pound sign and colon
MIDTERM EXAM REVIEW
CSS classes and IDs are defined by which
starting character, respectively, in the <style>
section?
a. Colon and period
b. Period and pound sign
c. Pound sign and period
d. Pound sign and colon
MIDTERM EXAM REVIEW
What is the purpose of clearing a float?
a. To display the next content to the right of the floated
div
b. To display the next content to the left of the floated
div
c. To display the next content below the floated
content.
d. To display the next content on top of the floated div.
MIDTERM EXAM REVIEW
What is the purpose of clearing a float?
a. To display the next content to the right of the floated
div
b. To display the next content to the left of the floated
div
c. To display the next content below the floated
content.
d. To display the next content on top of the floated div.
MIDTERM EXAM REVIEW
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
MIDTERM EXAM REVIEW
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
MIDTERM EXAM REVIEW
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>
MIDTERM EXAM REVIEW
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>
MIDTERM EXAM REVIEW
What will happen if we try to apply more than one
class to the same, specific XHTML element?
a. The styles from only the first class will be applied.
b. The styles from only the final class will be applied.
c. No styles will be applied.
d. The styles from all the classes will be combined and
applied.
MIDTERM EXAM REVIEW
What will happen if we try to apply more than one
class to the same, specific XHTML element?
a. The styles from only the first class will be applied.
b. The styles from only the final class will be applied.
c. No styles will be applied.
d. The styles from all the classes will be combined and
applied.
MIDTERM EXAM REVIEW
Why is it a bad idea to name a class "underline"?
a. Class names should reflect meaning and not describe
appearance.
b. The word 'underline' is reserved for the text-decoration
property.
c. Underlining is allowed only in links in XHTML
documents.
d. For older browsers, there is a seven character limit for
class names.
MIDTERM EXAM REVIEW
Why is it a bad idea to name a class "underline"?
a. Class names should reflect meaning and not describe
appearance.
b. The word 'underline' is reserved for the text-decoration
property.
c. Underlining is allowed only in links in XHTML
documents.
d. For older browsers, there is a seven character limit for
class names.
MIDTERM EXAM REVIEW
Write a single CSS shorthand statement that would
accomplish the same as the following three CSS
lines:
border-style: solid;
border-width: 3px;
border-color: red;
MIDTERM EXAM REVIEW
Write a single CSS shorthand statement that would
accomplish the same as the following three CSS
lines:
border: 3px solid red;
MIDTERM EXAM REVIEW
Which CSS property sets the background color for an
XHTML element, such as a table row?
a. bg:
b. bgcolor:
c. background:
d. background-color:
MIDTERM EXAM REVIEW
Which CSS property sets the background color for an
XHTML element, such as a table row?
a. bg:
b. bgcolor:
c. background:
d. background-color:
MIDTERM EXAM REVIEW
How can setting table column widths by percent hold
an advantage over setting them by pixels?
a. If the overall table width is modified, the column widths will
be modified in the same proportion.
b. Setting column widths by percent prevents tables from
flowing off the page.
c. Text size can be made to display larger only in columns set
by width, not by pixels.
d. If the viewer’s computer screen does not use pixels, columns
set in pixels will not display.
MIDTERM EXAM REVIEW
How can setting table column widths by percent hold
an advantage over setting them by pixels?
a. If the overall table width is modified, the column widths will
be modified in the same proportion.
b. Setting column widths by percent prevents tables from
flowing off the page.
c. Text size can be made to display larger only in columns set
by width, not by pixels.
d. If the viewer’s computer screen does not use pixels, columns
set in pixels will not display.
MIDTERM EXAM REVIEW
If a CSS class and a CSS ID are both assigned to the
same page element, and each specifies a different
text color, which of the styles will apply?
a. Both will be applied and the text will appear in the
average of the two colors.
b. Neither will be applied. The browser default color will
show.
c. The ID style will be applied.
d. The class style will be applied.
MIDTERM EXAM REVIEW
If a CSS class and a CSS ID are both assigned to the
same page element, and each specifies a different
text color, which of the styles will apply?
a. Both will be applied and the text will appear in the
average of the two colors.
b. Neither will be applied. The browser default color will
show.
c. The ID style will be applied.
d. The class style will be applied.
MIDTERM EXAM REVIEW
Which XHTML elements can be floated right or left
on the page?
a. None.
b. Only the <div> element.
c. Only the <img> element.
d. Many elements, including both the <div> and <img>
elements.
MIDTERM EXAM REVIEW
Which XHTML elements can be floated right or left
on the page?
a. None.
b. Only the <div> element.
c. Only the <img> element.
d. Many elements, including both the <div> and <img>
elements.