thoughts
tags, elements, attributes, properties etc
2006-02-20
For once and for all:
- Element
- An element is an HTML (or XML) building block, they are the whole thing and exist in DOM space. They consist of attributes and child elements and are described by a start tag, content and an end tag. Example
<p class="lede">this is a p element</p>. - Attribute
- An attribute is an extention to an element, it's the
class="lede"part in the above example and are built up by a (attribute) name and (attribute) value. - Tag
- An element is bounded by its opening and closing tags, so it's the
<p class="lede">and the</p>parts. So please stop talking about tags when you mean elements or attributes! A nice example is that you can omit both start and end tags for thehtml,headandbodyelements (in html), but the elements themselves are always present (in DOM space). - Properties
- Properties only live in DOM space. Some attributes reappear as properties, but they are not a priori the same, think of the
classNameproperty versus theclassattribute. They do not appear in the source code.
Further reading
Additional resources (top 15)
Below is a list of additional resources that might contain extra information about the subject at hand. These are all sites linking to this one (i.e. backtracking).
- properties of elements - Google Search (2)
- What are tags, attributes, properties - Google Search (2)
- internet explorer attribute properties - Google Search (1)
- tags elements attributes - Google Search (1)
- dom space - Google Search (1)
- element property attribute - Google-Suche (1)
- what is tag <a> and it's attribute? - Hanapin sa Google (1)
- tags, elements, attributes - Google Search (1)
- properties element attributes - Google Search (1)
- tags elements attributes - Google Search (1)
- attributes versus properties - Google zoeken (1)
- "class="lede"" - Google Search (1)
- xsl tricks - Google Search (1)
- Live Search: attributes properties [en] (1)
- elements of google - Google Search (1)
