newbie questions... What is the advantage of the fact that IDs must be
unique on a page? I am aware of the circumstance that if you need to
repeat an ID, set is as a class, but have still not figured out the
advantage of an ID.
¤ devendra ¤
In
On Thu, 10 Feb 2005 06:40:49 -0500, Trusz, Andrew [EMAIL PROTECTED]
wrote:
newbie questions... What is the advantage of the fact that IDs must be
unique on a page?
1. getElementById() works.
2. Validation. If you use div id=maincontent, validator will complain
when you have two or more such
You can address elements from the DOM (Document Object Model) directly via
JavaScript.
Cheers,
Mike Pepper
Accessible Web Developer
Internet SEO and Marketing Analyst
[EMAIL PROTECTED]
http://www.visidigm.com
Administrator
Guild of Accessible Web Designers
[EMAIL PROTECTED]
http://www.gawds.org
-Original Message-
From: [EMAIL PROTECTED] On Behalf Of Kornel Lesinski
Sent: Thursday, February 10, 2005 7:09 AM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Not and IE bug?...follow up difference why a difference
between IDs and classes?
newbie questions... What is the advantage
I thought I should pick up on the comment by Peter and ask one of my many
newbie questions... What is the advantage of the fact that IDs must be unique
on a page? I am aware of the circumstance that if you need to repeat an ID,
set is as a class, but have still not figured out the advantage of
The main advantage of using an ID is simply that it uniquely identifies the
element. So your CSS or DOM scripting can target it alone.
--
Iain Gardiner
http://www.firelightning.com
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of
Hi Devendra
Devendra Shrikhande wrote:
What is the advantage of the fact that IDs must be unique on a page? I am aware of the circumstance that if you need to repeat an ID, set is as a class, but have still not figured out the advantage of an ID.
This is an important topic. At first glance, it
I thought I should pick up on the comment by Peter and ask one of my
many newbie questions... What is the advantage of the fact that IDs
must be unique on a page? I am aware of the circumstance that if you
need to repeat an ID, set is as a class, but have still not figured
out the advantage