Docsity

Exam Questions: XHTML and CSS, Exams of Web Programming and Technologies

Toggle sidebar
bg1
1. Is it all right to send or receive text messages during the exam?
A. No
B. No
C. No
D. No
E. All of the above
2. “UTF-8” is the name of a character encoding. Why is it important to specify the character encoding
used for all web pages?
A. So the browser knows whether the web page is written in XHTML or CSS.
B. So the server knows which part of the web page is written in PHP.
C. So the browser knows what font to use for the text of a web page.
D. So the server knows what color to use for the text of a web page.
E. So the browser knows what rules to use to translate character codes into letters and symbols.
3. How does the code between <?php and ?> get processed?
A. The browser takes care of it.
B. The web server takes care of it.
C. The operating system takes care of it.
D. The user takes care of it.
E. Google takes care of it.
4. Which of the following statements describes the proper sequence of events:
A. The user selects a URL; the browser requests the web page; the server returns the web page; the
browser displays the web page to the user.
B. The user selects a URL; the server requests the web page; the browser returns the web page; the
server displays the web page to the user.
C. The browser selects the user; the user selects the URL; the server displays the URL; the user
displays the web page.
D. The server displays the web page; the user selects browser; the URL returns the browser to the
web page.
E. The browser requests the web page from the server; the server displays the web page; the user
selects the URL.
First Name Last Name! ! March 23, 2010
Student ID: Student ID!Exam ID: Exam ID
Instructions:
For multiple choice questions, circle the letter of the one best choice unless the
question explicitly states that it might have multiple correct answers.
Write short answers in the spaces provided.
There is no penalty for guessing, so answer all questions.
Unless otherwise indicated, all questions count equally.
No electronic devices of any sort may be used during the exam.
CS-081
Midterm Exam
pf3
pf4
pf5

Partial preview of the text

Download Exam Questions: XHTML and CSS and more Exams Web Programming and Technologies in PDF only on Docsity!

  1. Is it all right to send or receive text messages during the exam? A. No B. No C. No D. No E. All of the above
  2. “UTF-8” is the name of a character encoding. Why is it important to specify the character encoding used for all web pages? A. So the browser knows whether the web page is written in XHTML or CSS. B. So the server knows which part of the web page is written in PHP. C. So the browser knows what font to use for the text of a web page. D. So the server knows what color to use for the text of a web page. E. So the browser knows what rules to use to translate character codes into letters and symbols.
  3. How does the code between get processed? A. The browser takes care of it. B. The web server takes care of it. C. The operating system takes care of it. D. The user takes care of it. E. Google takes care of it.
  4. Which of the following statements describes the proper sequence of events: A. The user selects a URL; the browser requests the web page; the server returns the web page; the browser displays the web page to the user. B. The user selects a URL; the server requests the web page; the browser returns the web page; the server displays the web page to the user. C. The browser selects the user; the user selects the URL; the server displays the URL; the user displays the web page. D. The server displays the web page; the user selects browser; the URL returns the browser to the web page. E. The browser requests the web page from the server; the server displays the web page; the user selects the URL. Student ID: Student ID Exam ID: Exam ID

Instructions:

For multiple choice questions, circle the letter of the one best choice unless the

question explicitly states that it might have multiple correct answers.

Write short answers in the spaces provided.

There is no penalty for guessing, so answer all questions.

Unless otherwise indicated, all questions count equally.

No electronic devices of any sort may be used during the exam.

CS-

Midterm Exam

  1. What is ’? A. An XHTML tag B. A CSS rule C. A property name D. An attribute name E. A character entity
  2. Which of the following is a valid XHTML attribute? A. class=red B. title C. “my-name” D. title:”my-name” E. title=”my-name”
  3. Which of the following is a valid CSS property specification? A. background-color:red; B. ol ol C. ol > ol D. ol + ol E. ol - ol
  4. In a CSS selector , what does a space between the left and right elements mean? ( Terminology: if the selector is p span the left elements are p elements and the right elements are span elements.) A. Select all right elements that are children of left elements B. Select all right elements that are descendants of left elements C. Select all right elements and all left elements D. Select all right elements that are siblings of left elements E. Select all right elements

9. A web page author wants to display the text “Gallia est o mnis divisa in partes tres,” just like that. That

is, the word “omnis” is in italics, and the first letter is large, boldface, and red. What would be the correct XHTML markup to use? [ The exams were printed on a black-only printer; you will have to

pretend that the o is red. ]

A.

Gallia est

omnis

divisa in partes tres.

B.

Gallia est omnis divisa in partes tres.

C.

Gallia est omnis divisa in partes tres.

D.

Gallia est omnis divisa in partes tres.

E.

Gallia est omnis divisa in partes tres.

  1. What CSS rule could be used to display the contents of all span elements in italics? A. italics: {spans} B. span > span { italics } C. span { font-style: italic; } D. text-style { span : italic; } E. text-style { italics: spans; } Student ID: Student ID Exam ID: Exam ID
  1. What is the difference between block and inline elements? A. Block elements have white backgrounds, but inline elements have black backgrounds. B. Block elements have black backgrounds, but inline elements have white backgrounds. C. Block elements start on a new line, but inline elements do not. D. Block elements are square, but inline elements are rectangles. E. They are the same thing.
  2. What are collapsing margins? A. If there is not enough space for them, the margins between two boxes disappear. B. If two boxes are side-by-side, the margin between them disappears. C. If two boxes are arranged vertically, the margin between them reduces to the larger of the top margin of the bottom box or the bottom margin of the top box. D. The margins between boxes turn into borders. E. Boxes with collapsing margins have less content than boxes with margins that do not collapse.
  3. How do you specify the color of a boxʼs margins? A. You canʼt: margins are transparent. B. Use the margin-color CSS property C. Use the margin-color XHTML attribute D. Use the margin-color CSS attribute E. Use the margin-color XHTML property
  4. What do the W3C validators do? A. They prevent invalid web pages from being displayed in browsers. B. They prevent invalid web pages from being delivered by servers. C. They tell whether web pages have valid XHTML and CSS code. D. They correct invalid XHTML and CSS web pages. E. They help Google find well-formatted web pages.
  5. What are CSS margins used for? A. To manage the amount of space around the content of a box. B. To manage the space between boxes. C. To control the background color of boxes. D. To control the text color of boxes. E. To make text easier to read.
  6. Why should you add padding to a CSS box? A. You can pad the box with a line so that it will stand out better. B. You can use padding to make the text bigger. C. Padding puts space around text so it looks better and is easier to read. D. Padding increase the word count within a box in case someone requires you to include a minimum number of words. E. Padding can be used to double-space lines of text so there is more room for annotations. Student ID: Student ID Exam ID: Exam ID
  1. Where are CSS boxes displayed? A. In the browserʼs viewport B. In the serverʼs viewport C. In the browserʼs title bar D. They are not actually displayed: CSS boxes are simply used to manage CSS rules. E. All CSS boxes are nested inside one another.
  2. How many CSS boxes are there? A. 12 B. There is one CSS box for every element of the DOM tree, from the body element on down. C. None: you have to use DOM boxes instead. D. There is one CSS box for every CSS rule. E. There is one CSS box for every element in the head of a document.
  3. What is the name of the CSS property that controls how large text is? A. background-color B. color C. text-size D. pixels E. font-size
  4. How many different color names are there in CSS Level 3? A. 3 B. 16 C. more than 100 D. more than 1, E. more than 1,000,
  5. What property name is used to control the color of text? A. color B. font-color C. text-color D. foreground-color E. hue
  6. Where do attributes go? A. Inside CSS rules B. Inside XHTML start tags C. Inside CSS selectors D. Inside XHTML content E. In the head of an XHTML document
  7. What elements are selected by p > span? A. All paragraphs that contain spans B. All spans that contain paragraphs C. All paragraphs that are followed by spans D. All spans that are children of paragraphs E. All paragraphs that have spans as descendants Student ID: Student ID Exam ID: Exam ID