Back to the 2023 paper

Module I: Introduction to Web Technologies and Architectures

20237m

What are the drawbacks of HTML? How are they addressed in XML?

Worked SolutionAI Assisted

Drawbacks of HTML

  1. Fixed, predefined tags: you cannot create custom tags that describe your own data.
  2. Content mixed with presentation: tags like <b>, <font>, and <center> blend structure and looks.
  3. No data meaning (no semantics for data): <td>450</td> does not say whether 450 is a price or a roll number, so machines cannot understand it.
  4. Not designed for data exchange: it is meant for display, not for transporting structured data between systems.
  5. Lenient syntax: browsers accept unclosed tags, missing quotes, and wrong nesting, leading to inconsistent rendering and hard-to-parse documents.
  6. No validation: there is no built-in way to enforce a required structure.
  7. Poor searching and reuse: the same content cannot be easily reformatted for other devices or purposes.
  8. Not extensible: new needs require changes to the standard itself.

How XML addresses them

HTML drawback XML solution
Fixed tags Extensible: authors define their own tags, e.g. <price>, <author>
Content and style mixed Separates data from presentation; styling is done with CSS or XSLT
No data meaning Self-descriptive tags give data meaning: <price>450</price>
Not for data exchange Designed for storing and transporting data (used in web services, configuration, RSS)
Lenient syntax Strict, well-formed rules: every tag closed, correct nesting, quoted attributes, one root, case-sensitive
No validation DTD or XML Schema validate structure and data types
Poor reuse One XML source can be transformed to HTML, PDF, or other formats with XSLT
<book>
  <title>Web Technology</title>
  <price currency="INR">450</price>
</book>

XML does not replace HTML: HTML displays data, while XML describes and carries data.

Similar questions

Student FinanceWeb Platform

Pocketly — Personal Finance for Students

Keep your hostel and college expenses under control. Track accounts, log spending in seconds, and stay within your monthly budget.