Write two points of differences between XML and HTML. What is meant by a well-formed XML document
Write two points of differences between XML and HTML. What is meant by a well-formed XML document (write two points)? Write the code to create an XML document with following data:
| Designation | Cost | _of_days | Mode_of_trans |
| Singapore | 200000 | 8 | Aeroplane |
| Shimla | 10000 | 4 | Bus |
1 Answers
The differences between XML and HTML are as follows:
1. HTML has predefined tags while XML has user-defined tags.
2. HTML document can be viewed directly by the Web browser while XML document cannot be viewed directly and need some proper stylesheet files.
A well-formed document means to follow several generic rules, such as follows:
1. XML document must contain at least one element.
2. All tags must have the opening and closing tags as these XML tags are case sensitive.
The XML code is