|
Yes. if you are going to use the style more than once use a class, If for a specific block then use an ID.
However the same still applies. if it is a group of links, it is sensible both for code overhead and site maintenance to use a parent container, be it <p>, <ul>, <div>, <span> and apply the class or ID to that. If you want one specific link to be different then assign the class for that in the element.
A whatif scenario. You have all your links with a class directly in the element say "red", what happens in 6 months time and you now want them yellow, are you going to go through every page and change the classname to yellow, lot of work there possibly, or would you redefine the colors in .red to be yellows? Hmm! very confusing when you revisit the design in a few weeks and everything with a class="red" are now yellow.
CSS is a very flexible medium, why make it hard for yourself? Use it as it is meant to be used, that is to cascade properties down the elements.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|