Which of the following is not a feature of XML?

2023

Which of the following is not a feature of XML?

Answer: C. XML can separate design from HTMLConcept. In the standard web stack three different jobs are handled by three different technologies. HTML provides a fixed set of tags that give a page its…

  1. A.

    XML is designed to carry data

  2. B.

    XML is a complement to HTML

  3. C.

    XML can separate design from HTML

  4. D.

    XML can be used to create new languages

Attempted by 357 students.

Show answer & explanation

Correct answer: C

Concept. In the standard web stack three different jobs are handled by three different technologies. HTML provides a fixed set of tags that give a page its structure. CSS provides the rules that decide how that structure looks: fonts, colours, spacing and layout. XML is a meta-markup language whose author-defined tags describe what a piece of data means; its specification standardises a syntax for data and defines no rendering behaviour.

Application. Test each statement against that definition of XML:

  • "XML is designed to carry data" - this is XML’s stated design goal. A document is plain, self-describing text that can travel between unrelated systems and be parsed without a shared binary format.

  • "XML is a complement to HTML" - XML does not replace HTML. HTML renders the page while XML carries the data behind it, and the two are routinely used in the same application.

  • "XML can be used to create new languages" - because tag names are not predefined, XML acts as a meta-language. RSS, SVG and SOAP are all defined as XML vocabularies.

  • "XML can separate design from HTML" - design means presentation: fonts, colours and layout. Presentation is specified by CSS, so separating design from HTML is the job of CSS and not of XML.

Cross-check. The genuine XML property that this last statement imitates is separating DATA from HTML: the XML file holds the data while the HTML page holds the presentation. Replace "data" with "design" and the sentence stops describing XML and starts describing CSS.

Job

Handled by

Structure of a web page

HTML

Design and presentation: fonts, colours, layout

CSS

Describing and transporting data

XML

Result. The statement that XML can separate design from HTML is the one that is not a feature of XML.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Rssb Basic Computer Instructor

Loading lesson…