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 to apply a unique style for an element once in copy. Relative or absolute positioning and margins may be identified. – The CLASS attribute may be used repeatedly within copy. 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. |