




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Ampersand (&) & Less-than sign < Greater-than sign > Space
Quotation marks "
font-family font-size padding padding-left padding-right padding-top padding-bottom background-color color border-width border-style border-color margin margin-left margin-right margin-top margin-bottom border-collapse top left right position width height
a:link a:visited a:focus a:hover a:active
Multiple Choice, True/False, Short Answer (3 points each – 75 points total)
1) T/F: The following line of markup will validate as XHTML 1.0 strict. False. All attributes get quotes in XHTML. A link to my page
2) T/F: The following markup will validate as XHTML 1.0 strict. False. All elements in XHTML must either have a closing tag or be self-closed.
3) T/F: The head and body elements both belong nested inside the html element. True. This is the basic structure for every XHTML document. 4) T/F: Changing the width and height attributes of an img element can make big improvements to download time without even having to change the actual image file. False. It will display smaller, but the image file needs to be resized in order to save download time. 5) Which of the following is not an element used in a table? a) td b) th c) tb d) tr
6) T/F: A web page must be uploaded to a web server in order to be "on the Internet". True. Web servers serve web pages. Your laptop probably does not. 7) T/F: A relative URL is preferable to an absolute URL when linking to files on your own website. True. A relative URL uses just the filename, and the browser looks for it relative to the current directory. An absolute URL (http://...) is good for linking to other sites. 8) On your friend's computer you see that a website folder has both .html and .css files in it. Before getting any further information, you have already determined that the website (1) using external CSS and (2) using embedded CSS. Fill in the blanks. a) (1) is likely to be, (2) is not b) (1) must be, (2) is not c) (1) must be, (2) might be d) (1) is likely to be, (2) might be
9) What does the following Java code do?
g.setColor(new Color(255,0,0)); g.drawRect(5, 5, 20, 20); g.setColor(new Color(0,255,0)); g.drawOval(10, 10, 20, 20); g.setColor(new Color(0,0,255));
a) Draws a green square with a blue oval in front of it. b) Draws a red square and a green oval in front of it. c) Draws a green square with a blue oval behind it. d) Draws a red square and a green oval behind it.
15) Given the CSS rule below, which of the following elements would have the color applied to it?
div { color: #0000ff; } Note: div elements don’t have to have id’s. a) some text b)
some text
c)some text
d) None of the above16) Given the following CSS and XHTML fragments, what color is hello and goodbye?
CSS Fragment: div { color: blue; } p { color: red; } span { color: green; }
XHTML Fragment
Hello
Goodbye
_The most deeply nested element “wins” if there’s a conflict between different CSS rules._ **a) Hello is red, goodbye is green** b) Hello is blue, goodbye is red c) Hello is red, goodbye is red d) Hello is blue, goodbye is green17) What does the following Java code do?
if(x < 10 || x > 20) { g.drawLine(50, 0, 50, 100); } The vertical bars means “or”. The line is drawn from (50,0) to (50,100), which is vertical. a) Draws a vertical line, but only if x is both less than 10 and greater than 20. b) Draws a vertical line, but only if x is either less than 10 or greater than 20. c) Draws a horizontal line, but only if x is both less than 10 and greater than 20. d) Draws a horizontal line, but only if x is either less than 10 or greater than 20.
18) Give a hyperlink to a file called cool.html which is in the same directory as the index.html file you are writing.
_Click here _
19) Why do we use elements such as em and strong when we could get the same visual effect via CSS?
Possible reasons: it’s easier to use the built-in element, screen readers may differentiate between a visual style and something that’s read with emphasis.
20) What is the purpose of the style element?
To put embedded CSS in an html file.
21) Someone says they have "commented out some of their markup". Specifically, what are they talking about?
They temporarily disabled some of their markup so that website visitors won’t see that part of their page. This is useful if one wants to take something out of their site, but plans to re-introduce it later on.
22) Name one advantage and one disadvantage of using .png instead of .jpg
Advantages: .png files have lossless compression (i.e. perfect image quality) and transparency. Disadvantages: A .png file is larger than a .jpg file of the same image, and .png files have slightly less browser support.
23) In terms of accessibility, name at least one physical and one technology-based limitation that may effect a user's experience when visiting a website.
Physical: colorblindness, blindness, hearing impairments, difficulty using mouse/keyboard. Technology: slow Internet connection, old computer, low resolution, no sound, few display colors.
24) Convert the decimal number 171 into hexadecimal.
We want to figure out how many “ 16 ’s” there are in 171, and then what’s left over. 171 divided by 16 yields 10 with a remainder of 11. 10 in hex is A, and 11 in hex is B, so the answer is AB.
25) Convert the hexadecimal number 56 into decimal.
Each unit in the left column (5) counts for16, and each unit in the right column (6) counts for one. So we calculate 5*16+6 = 86.
Skunks
Skunks
These critters are cute, but do not provoke them or you will really smell bad a long time after. That has negative consequences & negates the prospect of meeting new people.
DietInsects Fruit Rodents
Check out the wikipedia page for more info.
/* This side of the page is the style1.css file */
#photo { position: absolute; background-color: #b0ffb0; top: 0; right: 0; border-color: #ff0000; border-style: double; border-width: 3; padding-left: 25px; padding-right: 25px; }
.highlight { background-color: #000000; color: #ffffff; }
h1 { font-family: "Baskerville old face", arial; }
a:link, a:visited, a:focus, a:hover, a:active { color: #005500; }
body { background-color: #b0b0ff; margin-right: 170px; /* This makes room for the photo at the right */ }