Click to See Complete Forum and Search --> : Id
sharkey
12-16-2003, 03:36 PM
Hey im kind of a newbie to web development even though i have still got a vast amount of knowlege. I have searched for this but could not find it anywhere. I have been reading on this board about <DIV ID="top">nav</DIV>
What does this ID do could anybody help me please.
Thanks
fredmv
12-16-2003, 03:49 PM
http://forums.webdeveloper.com/showthread.php?s=&threadid=21760#post113322
sharkey
12-16-2003, 04:22 PM
Hey thanks for the link it was a great description only one thing i have a question you said an id can only be used once. Does this mean that as with a class you could do this
<h1 class="bar">Hello, World</h1>
<h1 class="bar">Hello, World</h1>
<h1 class="bar">Hello, World</h1>
but you could not do that with the ID more than once within the document
fredmv
12-16-2003, 04:24 PM
You're welcome. Yes, you shouldn't have more than one element with the same id. However, you can have as many elements as you want with the same class.
ray326
12-16-2003, 04:26 PM
That's right. ID "identifies" a single element. CLASS defines any number of elements having the same characteristics (of the class).
sharkey
12-16-2003, 05:28 PM
cheers man i understand it now