H151 - Review Week 2

review questions week 2 graphic
  1. In the figure above, item 5 is a(n)
    1. embedded style sheet.
    2. class definition.
    3. ID definition.
    4. inline style specification.

    c.

  2. In the figure above, item 4 is a(n)
    1. embedded style sheet.
    2. class definition.
    3. ID definition.
    4. inline style specification.

    b.

  3. What are some advantages of using id over class? Please reference your response. For example, if you found the information at an online source, indicate the URL; if you used the text, list the page; or if you just knew, state that.

    IDs carry a higher weight than class. (p. 35;2nd Ed.).

  4. What are some advantages of using class over id. Please reference your response.

    Classes can be used for different elements. Can be used multiple times within a single page. Self knowledge.

  5. Please provide some examples of pseudo-classes and pseudo-elements. When might you use these CSS features? And when should they be avoided? Please reference your response.

    pseudo-classes - :link, :visited, :hover, :active;
    pseudo-elements - :first-letter; :first-line;
    They allow you to apply rules to situtations that are visitor/browser/moment dependent.
    Do not use pseudo-classes to change the size of fonts within an a tag, because the page will not redraw, causing display issues.
    (p. 35-41)

Jennifer Griner