Download sba practice questions

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
Questions in Green have been discussed in class (56)
Questions in Yellow have NOT been discussed in class (21)
Answers are in Red
SBA PRACTICE QUESTIONS
1.
What does HTML stand for?
8.
What is the start tag for an individual item in a
list?
a. <list>
b. <ol>
c. <li>
d. <item>
9.
Which of the following will create a bulleted
list?
a. <blist>
b. <ol>
c. <bullet>
d. <ul>
Hyper Text Markup Language
2.
3.
4.
5.
6.
7.
Which file extensions are used with standard
web pages?
a. .web, .doc
b. .xhtml, .css3
c. .txt, .xhtml
d. .htm, .html
What should be the first tag in any web page?
a. <head>
b. <body>
c. <html>
d. <page>
Which is not part of an XHTML element?
a. The start tag
b. The end tag
c. Attributes
d. Title
How would you create a link to another web
page named "page2.html"?
a. <a href="page2.html">link to page
2</a>
b. <a href=page2.html>link to page 2</a>
c. <a ref="page2.html">link to page 2
d. a ref="page2.html
What does the tag <p> stand for?
a. Paragraph
b. Person
c. Page
d. Presentation
What is the syntax for an XHTML comment?
a. <comment>This is a
comment</comment>
b. <com: This is a comment>
c. <!-- This is a comment -->
d. <comment:"This is a comment" />
10. What is wrong with the following?
<hr width=80% />
*The value should be in quotes*
11. What is wrong with the following?
<img source=”mypic.jpg” />
*“source” should be written as “src”*
12. What will happen if we specify an image's height
and width outside of its true proportion?
e.
f.
g.
h.
The web browser will not display the image.
The web browser will ignore the height and
width and display the image normally.
The web browser will display the alternate
text instead of the image.
The web browser will display a distorted
version of the image.
13. What is generally considered the best format to
use for color photographs on the web?
e. .jpg
f. .png
g. .gif
h. .bmp
14. Which of the following is not an available
attribute for the <img> element?
e. alt
f. filename
g. height
h. width
Questions in Green have been discussed in class (56)
Questions in Yellow have NOT been discussed in class (21)
15. Which image format can support animation?
e. .jpg
f. .gif
g. .png
h. .mov
16. What does target="_blank" do when specified in
an <a> element?
a. Tells the browser not to underline a
link.
b. Tells the browser to open a link in the
same window.
c. Tells the browser to display a blank
screen.
d. Tells the browser to open a link in a
new window.
17. A bookmark link starts with which symbol in the
href attribute? (Bookmark means “same page”)
a. #
b. $
c. :
d. @
18. What would a visually impaired person hear in a
screen reader in the place of a web image?
a. The name of the image file.
b. Nothing.
c. The text that precedes and follows the
image.
d. Whatever text is specified in the alt
attribute.
19. Which of the following statements is incorrect?
a. The <h1> tag should be used only once
per page.
b. An <h3> tag indicates something is
more important than something in an
<h4> tag.
c. A lower tag, such as <h4>, should not
be used unless all the higher ones
have been used.
d. Generally, a higher tag, such as <h1>,
will display larger than a lower tag,
such as <h3>.
Answers are in Red
20. Which of the following is not an element related
to displaying lists?
a. <li>
b. <list>
c. <ul>
d. <ol>
21. 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>
22. Which element is used to define a column?
a. <td>
b. <tr>
c. <tc>
d. <col>
23. What is wrong with the following:
<table>
<td>
<tr>row 1 col 1 </tr>
</td>
</table>
*The <tr> and <td> elements are
reversed*
24. 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.
25. What is wrong with the following:
p{
text-decoration:underline
}
*missing the semicolon*
Questions in Green have been discussed in class (56)
Questions in Yellow have NOT been discussed in class (21)
26. What does CSS stand for?
a. Classic Style Sets
b. Cascading Style Sheets
c. Correct Style Sheets
d. Cascading Style Sets
27. Internal Styles can be found
a. In a separate file from the html
document
b. In the <body> of the html document
c. In the <head> of the html document
d. In the <title> of the html document
28. What will the following CSS do?
p{
color:blue;
}
a.
b.
c.
d.
The text of the entire page will be blue.
The background color of the page will
be blue.
The background color of any paragraph
element will be blue.
The text of any paragraph element
will be blue.
29. Which property sets the font?
a. text-family
b. font-style
c. font-family
d. text-type
30. In the following CSS statement, which is
considered the selector?
p{
color:blue;
}
a.
b.
c.
d.
p
{}
color
blue
31. The correct syntax for using a colspan attribute is:
i. <td colspan:3>
j. <td colspan="3">
k. <td colspan=3>
l.
<td colspan=100%>
Answers are in Red
32. How many times can a CSS class selector be
used 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
33. A CSS class is defined by starting with which
character?
a. Colon
b. Period
c. Backslash
d. Semicolon
34. What will happen if we try to apply more than
one class to an XHTML element?
i. Only the first class will be used
j. Only the final class one will be used
k. None of the classes will be used.
l. All of the classes will be combined.
35. How will the following display on the screen?
<p>This is my <span>first</span>
paragraph.</p>
i.
j.
k.
l.
The word 'first' will display in italics.
The word 'first' will display however the
"span" class was defined.
The word 'first' will display the same
as the other text.
The word 'first' will not display.
36. 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. None of the above.
Questions in Green have been discussed in class (56)
Questions in Yellow have NOT been discussed in class (21)
37. Which is the shorthand for the following CSS?
border-width:3px;
border-color:red;
border-style:solid
a.
b.
c.
d.
border-style:solid 3px red;
border:3px solid red;
borders:solid red 3px;
border:red solid 3px;
38. Which CSS property sets the background color
for an XHTML element, such as a table?
a. bg
b. bgcolor
c. background
d. background-color
39. If you don't specify 'border-collapse:collapse' for
a table, what will happen?
a. Cell border lines will appear in
double where table cells meet.
b. No cell borders will show in the table.
c. Only one border around the perimeter
of the table will display.
d. Several extra blank spaces will be
added between cells.
40. Which of the following is not a legitimate
border-style option?
a. dotted
b. dashed
c. double
d. groove
41. Going from the outside in, what is the order of
components in the box model?
i. Content, padding, border, margin
j. Border, padding, margin, content
k. Border, margin, padding, content
l. Margin, border, padding, content
Answers are in Red
42. If we applied the CSS style {padding:10px 0px;}
to a div element, what would happen?
m. 10 pixels of padding would be added
to the top and bottom of the div.
n. 10 pixels of padding would be added on
all sides of the div.
o. 10 pixels of padding would be added to
the right and left of the div.
p. 10 pixels of padding would be added to
the bottom of the div.
43. If a div had a width of 200px, a border of 5px,
padding of 10px, and a margin of 5px, what
would be the overall width of the div?
m. 200px
n. 205px
o. 220px
p. 240px
44. For what reason would we want to set the right
and left margins of a div to "auto"?
m. To make the div sit next to other
elements with no space in between
n. To force the div to float to the right
o. To make the div center itself in the
available space
p. To let the browser use its default of
10px margin
45. If we floated one div to the right and another to
the left, where would the next page content
display on the page?
m. In between the two divs, in all
circumstances
n. In between the two divs, but only if
there is sufficient space
o. Beneath the div on the right
p. Beneath the div on the left
46. What is the purpose of clearing a float?
a. To display the next content below the
floated content, rather than side-by-side.
b. To display the next content to the
right of the floated div
c. To display the next content to the left of
the floated div
d. To display the next content on top of
the floated div
Questions in Green have been discussed in class (56)
Questions in Yellow have NOT been discussed in class (21)
47. Find five errors in the following code (circle
them and state what is incorrect):
<!DOCTYPE HTML>
<head>
<title>My First Web Page</title>
<style type="text/css" media="all">
.outside {
width:100%;
height:50px;
color:red;
}
.inside {
color:white;
width:100px or %;
}
.inner {
width:600px;
margin:auto;
height:300px; }
bottom {
color:blue;
width:100%;
height:100px;
}
</style>
</head>
<body>
<div class="outside"">
</div>
<div class="inside">
<div class="inner">
<p>This is the inside
container.</p>
</div>
<div class="bottom”>
<p>This is the footer.</p>
</div>
</div>
</body>
</html>
Answers are in Red
48. To access an external CSS file, place which of
the following in your HTML:
a. <link rel="stylesheet" type="css"
name="style.css" />
b. <link href="stylesheet" type="text/css"
name="style.css" />
c. <link rel="stylesheet"
type="text/css" href="style.css" />
d. <link rel="stylesheet" type="css"
href="style.css" />
49. Where does the style sheet <link> statement
belong?
a. Between <head> and </head>
b. Between <title> and </title>
c. Between <body> and </body>
d. Immediately after the DOCTYPE
statement
50. Which of the following lines would be out of
place in an external CSS style sheet?
q. .class {
r. text-decoration:underline;
s. </style>
t. /* Trying a new style */
51. Why is XHTML validation important?
q. It confirms that all our web pages are
linked together properly.
r. It ensures that our web pages display
consistently to visitors.
s. It verifies that our page content is
factually correct.
t. It is required before search engines will
list our website.
52. How does the XHTML validator know which
rules to apply to our web document?
q. It is based on which web browser we
are using.
r. All documents have the same rules
applied to them.
s. It will prompt us each time to select a
set of rules.
t. It is based on what we specify in the
DOCTYPE statement.
Questions in Green have been discussed in class (56)
Questions in Yellow have NOT been discussed in class (21)
53. Which of the following is true about external
style sheets?
a. They are essential for large websites.
b. They keep the look of all pages
consistent.
c. They are efficient for making global
changes to all pages at once.
d. All of the above are true.
54. Why do we not use absolute paths when
referencing other files?
a. They never work correctly.
b. They will not work when we move
our files to the internet.
c. They will not pass XHTML validation.
d. They are too long and use more space
than necessary.
55. If our XHTML document fails validation, how
do we know what was wrong?
a. The validator program will email us a
file listing the errors.
b. We have to figure out the errors on our
own and retry validation.
c. The validator program will list the
line numbers and errors detected.
d. The validator program will fix the
errors and display a corrected version of
the file.
56. If you have a separate subfolder called "images"
directly below the folder where your XHTML
document resides, which would be the correct
way to reference an image file from your web
document?
a. <img src="photo.jpg" />
b. <img src="/photo.jpg" />
c. <img src="../images/photo.jpg" />
d. <img src="images/photo.jpg" />
57. What is one advantage of using relative paths
and subfolders?
a. It can help us keep our site files well
organized and uncluttered.
b. It will improve our chances of passing
XHTML validation.
c. It makes our site more user-friendly for
our web visitors.
d. It makes our code easier to read.
Answers are in Red
58. RGB stands for:
a. Red, Gray, Black
b. Royal Blue, Gold, Brown
c. Red, Green, Blue
d. Red, Gold, Brown
59. The hex code #FFFFFF represents which color?
a. Black
b. White
c. Gray
d. Brown
60. To increase the color blue in the hex code
#AA3450, you might use which code?
a. #AA34AA
b. #AA3400
c. #FF3450
d. #AAFF50
61. Why is the main reason we are limited in the
fonts we can use on our web pages?
a. Most fonts do not look good on the
internet.
b. Choosing inappropriate fonts can slow a
website's performance.
c. We are restricted to those fonts
installed on our viewers' computers.
d. Fonts are expensive and we have to
budget to those we can afford.
62. Which of the following are common sans-serif
fonts?
a. Georgia, Times New Roman
b. Courier New, Palatino
c. Book Antiqua, Baskerville
d. Arial, Verdana
63. Which of the following is not true about
declaring fonts for our web pages?
a. Font names containing spaces must be
surrounded by quotes.
b. Fonts should be listed in reverse
order of preference.
c. Fallback fonts are recommended, in
case the primary font is not available.
d. Our choice of font will have an effect
on the "look and feel" of our website.
Questions in Green have been discussed in class (56)
Questions in Yellow have NOT been discussed in class (21)
Answers are in Red
64. Which is an effective way to guarantee that an
unusual font will display on our page?
a. Purchase the font and install it on our
website.
b. Name at least two fallback fonts in our
declaration.
c. Place the text into an image and
display the image on the page.
d. Place the font name in quotes in our
declaration.
69. Which of the following creates a text field in a
form?
a. <input type="text" size="40"
name="myname" />
b. <input type="input text" size="large"
name="myname" />
c. <textfield size="40" name="myname"
/>
d. <text size="40" name="myname">Text
to be displayed</text>
65. Which of the following is true about embedding
a YouTube video on our web page?
a. YouTube requires that we use a specific
size window for the video.
b. We have to write our own embed code
and type in the video number as
reference.
c. We might have to pay a royalty fee to
YouTube for the right to display the
video.
d. The code given to us by YouTube
might not be XHTML valid.
70. Which is the correct input type for choosing one
item from a list of items?
a. text
b. radio
c. checkbox
d. option
66. Using a hex code, write the CSS to make
paragraph text display in red:
#FF0000
67. Now write the CSS to make paragraph text
display in Century Gothic font. If that font is not
available, make Tahoma and sans-serif as the
backup fonts, in that order:
p { font-family: “Century Gothic”, Tahoma,
sans-serif; }
68. Which of the following is used to create a web
form?
a. <startform> and <endform>
b. <form action="" />
c. <form action=""> and </form>
d. <link rel="form" type="form"
href="form.frm" />
71. Which is the correct input type for picking one or
more items from a list of items?
a. text
b. textarea
c. checkbox
d. radio
72. If we add the multiple="multiple" attribute to a
<select> element, what effect will it have?
a. It will allow us to make several
duplicates of the same drop-down box.
b. It will make a drop-down element
display the same as a checkbox element.
c. It will have no effect on the <select>
element. It is intended for the <input>
element.
d. It will allow the visitor to select more
than one of the options in a dropdown box.
73. The element used within the "select" element to
create a drop-down list is:
a. <option value="value">text</option>
b. <option name="name">text</option>
c. <value="value">text</value>
d. <name="name">text</name>
Questions in Green have been discussed in class (56)
Questions in Yellow have NOT been discussed in class (21)
74. Which is true of the textarea element?
a. It allows the web designer to set the
number of columns and rows to
display.
b. It restricts the length of the field to 40
characters.
c. It is identical to the text field element.
d. It is used to let the viewer choose
between two or more text options.
75. Which of the following would create a button
labeled "Click Me" to submit form data?
a. <input type="submit" value="Click
Me" />
b. <input type="submit">Click
Me</input>
c. <input name="submit" text="Click Me"
/>
d. <input type="button" value="Click Me"
/>
76. Which two CSS properties are used to place a
gradient on a web page?
a. <img>, <div>
b. bgcolor, img
c. color, background-color
d. background-image, backgroundrepeat
77. Why are gradient files often made to be just 1px
wide or high?
a. Because they are not visible on the web
page.
b. In order to save space and speed up
page loading time.
c. In order to make it difficult for web
visitors to copy them.
d. Because they will only pass XHTML
validation if they are under 10px wide.
Answers are in Red