Monday, April 18, 2011

Week 6ix

This weeks was less stressing because most of the class time was dedicated to working on our final projects. Additionally we went more in-depth with the ID and Class selectors in CSS.
The "Class" selector makes matching a rule with multiple elements that carries the class attribute
within the Html possible.
 The ID selector while serving a similar purpose, it applies to only the content of one element
as the Id attribute is unique inside the html page. The following example shows how the class and id
selectors are written in CSS.

class .p {  }    The period (.) identifies a class
Id #p {  }    The number sign (#) identifies an Id

Its also very important to note that the Id attribute takes priority over the class attribute.

No comments:

Post a Comment