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 web technology
  1. Extract text from the result document

  2. Extract text from the source document

  3. Place text into the source document

  4. None of the above

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

The xsl:value-of element extracts and outputs the text content from a node in the SOURCE XML document. It evaluates the XPath expression in the select attribute against the input document and inserts the result into the output tree.

Multiple choice technology web technology
  1. Select the Jim element

  2. Select the Jim attribute

  3. Select the id attribute

  4. Select the id attribute if the value is Jim

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

The expression select="@id" (with value 'Jim' being the predicate filter) selects the id attribute value of elements where id equals 'Jim'. Option C correctly identifies that it selects the id attribute - the @ symbol in XPath denotes an attribute.

Multiple choice technology web technology
  1. createElement()

  2. reateTextNode()(

  3. createComment()

  4. None of the above

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

The SAX parser is event-based and does not create node objects at all. Methods like createElement(), createTextNode(), and createComment() are DOM API methods. SAX fires events (startElement, characters, endElement) but doesn't build a node tree.

Multiple choice technology web technology
  1. Organizes the XML document into a tree

  2. Reads a block of an XML document at a time

  3. Enables you to correct the contents of an XML document

  4. None of the above

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

SAX (Simple API for XML) is an event-based, streaming parser that reads XML documents sequentially in blocks. It doesn't build a tree structure like DOM parsers, and it's read-only - it cannot modify XML content. This makes it memory-efficient for large XML files.

Multiple choice technology web technology
  1. Statements will continue to execute as the XML document is being loaded.

  2. Statements will not execute until the XML document is being loaded.

  3. The XML document is synchronized to the HTML page.

  4. None of the above

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

When async is set to false in XML loading (e.g., XMLHttpRequest), JavaScript execution blocks until the XML document is fully loaded. This creates synchronous behavior - the next statement won't execute until the load operation completes. This is the opposite of async=true, which allows continued execution during loading.

Multiple choice technology web technology
  1. Property containing a reference to the first child of an element

  2. Method that makes the current node the first child

  3. Method that substitutes the first node for the last node

  4. Method that substitutes the last node for the first node

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

firstChild is a DOM property that contains a reference to the first child node of an element. It's a read-only property that returns null if the element has no children. It's not a method that performs actions - it simply accesses the existing node structure.

Multiple choice technology web technology
  1. Create a new HTML element

  2. Create a title for a new HTML element

  3. Create a new XML element

  4. Create an attribute called title for the current XML element

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

createElement() is a DOM method used to create new element nodes. While it can create both HTML and XML elements, in the context of XML programming (which the other questions reference), option C is the intended answer. Option B is incorrect because it doesn't create titles - it creates elements. Option D is incorrect because it doesn't create attributes.