Week 2 - Review questions

1. In the figure above, item 5 is a(n)
id definition (id selector)
2. In the figure above, item 4 is a(n)
class definition (class selector)
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.
id has the advantage of being unique and more specific. It makes it ideal to use for elements that occurr only once on a page, like menus, banners, headers, etc. See Cascading Style Sheet, pages 32-38 and http://www.w3.org/TR/CSS21/selector.html#class-html
4. What are some advantages of using class over id. Please reference your response.
class enable you to give the same class specifications to more than one elements in a page. See Cascading Style Sheet. pages 32-38 and http://www.w3.org/TR/CSS21/selector.html#class-html