- #1
DaveC426913
Gold Member
- 22,567
- 6,220
What's the design difference between elements and attributes? What I'm asking is: what makes you decide that something should be an element versus an attribute?
i.e: which is better?
Does the difference lie in the fact that 'Spike' is likely to be user-facing content - as opposed to some behind-the-scenes value such as a width of 200?
Code:
<pet>
<name>Spike</name>
</pet>
Code:
<pet name="Spike">
</pet>
Last edited: