Forum Moderators: open
I am fairly familiar with oldstyle html, and have an introductory understanding of CSS. When I use dreamweaver WSWYG editor, why does it insert the "id" attribute to my anchors? If I am only using this as an anchor, is this necessary, and/or how can I use it to my advantage.
Currently in XHTML / DOM2, the
name and id attributes share the same namespace in the DOM. CSS selectors that start with the pound / sharp sign ("#") specify elements with
id attributes (e.g., #red specifies the element that has id="red"). Plus I can think of another reason,
You may have generated menus or anything with script, DW may be using the
id attributes for JavaScript DOM methods, the most common of which is document.getElementById("red"); (where the element you want to get the object for has id="red"). Jordan