- From: Timothy J. Luoma <luomat@peak.org>
- Date: Mon, 27 May 2002 12:54:41 -0400 (EDT)
- To: Gabriel <ghrivera@sinectis.com.ar>
- cc: hwg-style@hwg.org, <www-style@w3.org>
On Mon, 27 May 2002, Gabriel wrote: > What's the difference between using <div id=smth> and <div class=smth> > (and <div id=smth1 class=smth2>)? > Are they supposed to have different content? Basically, you can only have one ID of a certain value per page, but you can reuse classes all you want. For example, this would be legal to have on one page <div id="top" class="paragraph"> .... </div> <div id="middle" class="paragraph"> .... </div> <div id="bottom" class="paragraph"> .... </div> but this would not: <div id="paragraph"> ... </div> <div id="paragraph"> ... </div> <div id="paragraph"> ... </div> You can also make links to 'id' tags 'id' tags can also be used for other elements other than DIV TjL ps -- be sure to quote your values in class and id and other attributes... using lowercase is also good.... you'll thank me one day when you start to use XML/XHTML for the habits you develop today
Received on Monday, 27 May 2002 13:11:31 UTC