Ryan's District Boards

Computer, programming, and webmaster help , support , tips and tricks => Tutorials Zone! => Internet webmaster computer programming technology tips and tricks => XML Tutorials => Topic started by: ben2ong2 on October 05, 2006, 04:58:36 PM

Title: All XML Elements Must Have a Closing Tag
Post by: ben2ong2 on October 05, 2006, 04:58:36 PM
With XML, it is illegal to omit the closing tag.
In HTML some elements do not have to have a closing tag. The following code is legal in HTML:
<p>This is a paragraph<p>This is another paragraph
In XML all elements must have a closing tag, like this:
<p>This is a paragraph</p><p>This is another paragraph</p>
Note: You might have noticed from the previous example that the XML declaration did not have a closing tag. This is not an error. The declaration is not a part of the XML document itself. It is not an XML element, and it should not have a closing tag.