Gazing into my crystal ball I observed Andy Dingley
<> writing in news:8228853a-5253-4c9c-a982-
:
> On 28 Nov, 18:34, shapper <mdmo...@gmail.com> wrote:
>
>> When should I give an ID to a div?
>> I have many div's with a CSS class but no id ... Is there a problem
>> about it?
>
> Use an id if you're planning to try and find it from JavaScript.
Or if you want to give the ability to link to a fragment - eg.
mypets.html#cats - <h2 id="cats">Cats</h2>
>
> For CSS work, use class in preference.
I don't know about that. I style elements, and use ID for certain
parts, eg. #content, #nav, #header, #footer, all the "structural" parts
of a document, and then I use classes to apply "attributes" to those
ids.
>
> You don't _need_ either, unless you know that you need them, or you
> think you might need them pretty soon (if you're writing HTML first,
> then trying to style it). It's certainly not a mistake or error to not
> have them.
>
Agreed.
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share