Cascading Style Sheets (CSS) ID Attribute: An ID begins with the "#" character. For example:
A CLASS begins with the "." character. For example:
What's the difference between ID and CLASS? – An ID attribute is used once in copy to refer to a specific element. – The CLASS attribute may be used repeatedly for any number of elements. TIP: The definition for #position1 gives it an "absolute" position on the page (based on the upper left hand corner), as opposed to a relative position, which would be in relation to previous blocks of copy. |