H151 Week #2 Review Questions

1. C (ID selector)

2. B (Class selector)

3. ID is more specific than class, since each ID must be unique within a given document (lecture/text). This also facilitates consistent style across multiple pages within a site, by dividing each into unique sections, for example #header, #content, and #footer (lecture). Also the ID can be used as a label for a navigation anchor (H101 class).

4. Unlike ID, class can be used at multiple places in the document, and can generate different effects when paired with different element selectors (lecture/text).