Question 79


2.1.2 Question

Multiple Choice

You are designing a web application. You want to create a certain look and feel while reusing styles across pages as much as possible. How should you handle styles?

  • A. Use only one or two styles throughout your application to simplify maintenance.
  • B. Use a specific (unique) style for every element.
  • C. Use general styles for common elements and specific styles for elements that are unique.
  • D. Use inline styling.

Answer:

C
Explanation
A. Incorrect: It is unlikely that one or two styles will enable you to create the look and feel you want.
B. Incorrect: Using a specific style for each element will limit your ability for style reuse.
C. Correct: You should use general styles as much as possible. Achieving a certain look and feel means that you might have to create some specific styles, however.
D. Incorrect: Although inline styling will give you the most, control over styling, it removes the possibility of code reuse. Design changes would be difficult to implement.