What Is the Difference Between a Tag and an Element?

Tags mark the start and end of an element.

  • <foo> — start tag
  • </foo> — end tag
  • <foo></foo> — element

See the specification:

Each XML document contains one or more elements, the boundaries of which are either delimited by start-tags and end-tags, or, for empty elements, by an empty-element tag.


See also section 5 of NOT the comp.text.sgml FAQ

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)