Chris – fair point. Perhaps an ID would be more appropriate on the body tag. However, for the links themselves, it’s conceivable that you could have more than one representation of the selected site section on a page, so a class works for me.
When looking at it from a site-wide point of view, however, it’s often more practical to have a class on the body as each individual page within that site section may have an ID of its own. For example, your Map and Directions page with the Contact section might have a body tag like so:
Chris – fair point. Perhaps an ID would be more appropriate on the
body
tag. However, for the links themselves, it’s conceivable that you could have more than one representation of the selected site section on a page, so a class works for me.When looking at it from a site-wide point of view, however, it’s often more practical to have a class on the
body
as each individual page within that site section may have an ID of its own. For example, your Map and Directions page with the Contact section might have abody
tag like so:This would enable you to write specific CSS rules for the layout of that page without having to throw in extra divs and what have you.
So conceptually from a site-wide perspective, you are classifying the page more than you are uniquely identifying it – at least for this purpose.