Computer Knowledge

Markup and Web Languages

1,701 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
  1. True

  2. False

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

Content creators use Authoring Templates to create new content, not Presentation Templates. Authoring Templates define the structure and fields for content creation. Presentation Templates are used later to control how content is displayed to users. Option A is incorrect because it confuses the creation phase with the rendering phase.

Multiple choice technology
  1. True

  2. False

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

In WCM, you can reference elements from various sources including Sites, Site Areas, content items, and components. This flexibility allows for dynamic content composition and reuse across the content management system. Option B is incorrect because WCM explicitly supports cross-referencing between these element types.

Multiple choice technology web technology
  1. portlet

  2. portal

  3. portletAPI

  4. depends on the taglib definition

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

JSR168 portlet custom tags are not prefixed with a fixed string like 'portlet', 'portal', or 'portletAPI'. The prefix depends entirely on the taglib definition in the portlet's deployment descriptor and tag library descriptor files. Developers define their own prefixes in the taglib directive.

Multiple choice technology programming languages
  1. Tags in XML cannot contain spaces in them.

  2. Tag Names can start with a character (A-Z) or an _(Underscore)

  3. Tag Names starting with Underscore cannot have another Underscore in them.

  4. Tag Names cannot start with an Underscore

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

XML tag names cannot contain spaces (option A). Tag names can start with letters (A-Z) or underscores (option B). If a tag name starts with an underscore, it can contain additional underscores (option C is true). Option D is false because tag names CAN start with underscores - they're valid. XML naming rules are specific but allow underscores in both positions.

Multiple choice technology programming languages
  1. All Valid SGML Documents are Valid XML Documents

  2. XML Can Contain HTML tags

  3. XML is less Complex than SGML

  4. XML can be extended using Optional SGML Extras

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

XML is indeed simpler than SGML (option C), as it was designed to be a streamlined subset. XML can be extended using optional SGML features (option D). Options A and B are both false - not all valid SGML documents are valid XML (XML has stricter rules), and XML tags are not the same as HTML tags even though they may look similar. XML and HTML are distinct markup languages with different purposes.

Multiple choice technology programming languages
  1. A way of doing transformations in XML

  2. Used to change the layout of the XML

  3. Used to induce HTMl effects in XML

  4. None of the above

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

Stylesheets like XSLT serve two primary purposes in XML: transforming documents into different structures (like converting XML to HTML) and controlling presentation layout. Option A correctly identifies the transformation capability, while Option B describes the layout/presentation function. Options C and D are incorrect because stylesheets don't 'induce HTML effects' as suggested, and 'None of the above' is false since both A and B are valid functions of stylesheets.

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.