Computer Knowledge

Markup and Web Languages

1,492 Questions

Test your understanding of HTML tags, XML structures, and web page creation technologies. The questions cover elements like CSS styling, parsing documents, and defining web attributes. This section is essential for candidates appearing for computer proficiency tests in various competitive exams.

HTML tags and attributesXML document parsingCSS styling levelsWeb page creation basicsBrowser compatibility

Markup and Web Languages Questions

Multiple choice technology programming languages
  1. Create a template of the XML hierachy

  2. Validate the XML

  3. Ensures Well Formed XML’s creation

  4. Format the XML

Reveal answer Fill a bubble to check yourself
A,B,C Correct answer
Explanation

DTD (Document Type Definition) serves three key purposes in XML: it provides a template defining the valid structure and hierarchy of an XML document (Option A), validates that XML documents conform to that structure (Option B), and by defining the structure, it ensures the creation of well-formed XML documents (Option C). However, DTD is NOT used for formatting or presentation - that's the role of XSLT stylesheets. Therefore, Options A, B, and C are correct, while D is incorrect.

Multiple choice technology programming languages
  1. The ones which replacecs DTD’s

  2. Helps in creating wellformed XML

  3. Enforces Data Types in XML

  4. Can be inline or external

Reveal answer Fill a bubble to check yourself
B,C,D Correct answer
Explanation

XSD (XML Schema Definition) provides enhanced capabilities for XML documents. It helps create wellformed XML by defining structure and constraints (Option B), enforces data types on elements and attributes (Option C), and can be embedded within XML documents or stored as external references (Option D). Option A is incorrect: XSD doesn't replace DTD - both coexist as schema definition languages, though XSD offers more powerful features like data typing and namespace support.

Multiple choice technology programming languages
  1. <Name>

  2. <Element>

  3. <Underscore>

  4. <0~id>

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

XML tag names must follow strict naming rules: they can contain letters, digits, and certain punctuation, but CANNOT start with a digit or punctuation character. '<0~id>' violates this rule because it starts with '0', making it invalid. Options A, B, and C are all valid XML tag names. CDATA sections allow including special characters as content but don't affect tag naming rules.

Multiple choice technology programming languages
  1. XML Enforces Strict Type Checking

  2. XML are strictly non-extendable

  3. XML replaces the old HTML

  4. XML extends HTML

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Option A is correct: when used with XSD schemas, XML enforces strict data type checking on elements and attributes, which is one of XML's key advantages over looser formats. Option B is incorrect because XML was designed specifically to be extensible - developers can create custom tags and structures. Option C is incorrect because XML doesn't replace HTML; they serve different purposes (data vs. presentation). Option D is incorrect because XML doesn't extend HTML - XHTML does, but plain XML and HTML are separate specifications.

Multiple choice technology programming languages
  1. HTML

  2. WSDL

  3. JSP

  4. SGML

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

XML (eXtensible Markup Language) was designed as a simplified, streamlined subset of SGML (Standard Generalized Markup Language). SGML is a complex, full-featured meta-language for defining markup languages, while XML保留了 SGML's core capabilities but removed its complexity to make it practical for web use. Option D is correct. HTML, WSDL, and JSP are not the parent language of XML - HTML is a separate markup language, WSDL is an XML-based interface definition language, and JSP is a server-side Java technology.

Multiple choice technology programming languages
  1. All the statements are true

  2. All XML elements must have a closing tag

  3. All XML elements must be lower case

  4. All XML documents must have a DTD

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In XML syntax, every start-tag must have a corresponding end-tag (closing tag), making this statement true. XML elements do not have to be lowercase, and XML documents do not require a DTD to be well-formed.

Multiple choice technology programming languages
  1. The browser name

  2. The size of element name

  3. Entity declarations

  4. Element declarations

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

DTD specifies element declarations, entity declarations, attribute list declarations (ATTLIST), and notation declarations. It is browser-independent and does NOT specify which browser to use. The DTD defines document structure, not presentation or browser-specific information.

Multiple choice technology programming languages
  1. Required when validating XML documents

  2. No longer necessary after the XML editor has been customized

  3. Used to direct conversion using an XSLT processor

  4. A good guide to populating a templates to be filled in when generating an XML document automatically

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

DTD is required for validating XML documents against a defined structure. XSLT uses XSLT stylesheets for transformation, not DTD. Customizing an XML editor doesn't eliminate the need for DTD when validation is required. DTD defines structure, not template content.

Multiple choice technology programming languages
  1. In XMl Declaration

  2. As an Attribute of Root Element

  3. In the ATTLIST

  4. In DTD

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Processing Instructions (PIs) like can be included in the DTD section of an XML document. They provide instructions to applications processing the XML. PIs are not attributes, not part of element declarations, and not restricted to the XML declaration alone.

Multiple choice technology programming languages
  1. Complex Content

  2. Simpel Content

  3. Hybrid Content

  4. Pre-Defined Content

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In XSD, an empty element has complex type with complexContent restriction. It may have attributes but no character content. Simple content would allow text content. 'Simpel' is also misspelled. Empty elements like
have complex content models in schema definitions.

Multiple choice technology programming languages
  1. Are a part of XML Structure

  2. Are mandatory in XSD

  3. Are Used in Inline and External XSD

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

XSD annotations () provide documentation and are optional. They can appear in both inline XSD (embedded in XML) and external XSD files. Annotations are not part of core XML structure - they're XSD-specific documentation elements.

Multiple choice technology programming languages
  1. All the statements are true

  2. All XML elements must have a closing tag

  3. All XML elements must be lower case

  4. All XML documents must have a DTD

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

XML requires all elements to have a closing tag (or self-close like
). XML is case-sensitive but doesn't require lowercase. DTD is optional for XML - well-formed XML doesn't need a DTD. Only option B is universally true for XML.

Multiple choice technology programming languages
  1. Improves Server Performance

  2. Allows customize data presentations

  3. Replaces XML

  4. Used to store xml to databases

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

XSLT transforms XML documents into different formats like HTML, text, or other XML - enabling customized presentations. It doesn't replace XML, doesn't inherently improve server performance, and isn't for database storage. XSLT is a presentation layer technology.

Multiple choice technology programming languages
  1. <xml version="1.0" />

  2. <?xml version="1.0"?>

  3. <?xml version="1.0" />

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

XML declaration uses Processing Instruction syntax: . Option A is wrong - needs not <. Option B is technically correct but marked false. Option C adds a space before ?> which is also valid XML 1.0 syntax. The ?> PI syntax is the key.