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 architecture
  1. <% code %>

  2. <@jsp code %>

  3. <jsp: scriptlet code />

  4. <%jsp code %>

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

A JSP scriptlet is used to insert Java code into a JSP page and is enclosed within &lt;% and %&gt; delimiters. Other options like &lt;@jsp code %&gt; or &lt;%jsp code %&gt; are syntactically invalid, and `` is the XML equivalent but not styled as shown in the distractors.

Multiple choice technology architecture
  1. <%-- comment --%>

  2. <!-- comment -->

  3. <% // comment %>

  4. <% /* comment */ %>

  5. <% /** comment */ %>

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

JSP comments are server-side comments that use the syntax <%-- comment --%>. These comments are completely removed from the generated output and never sent to the client. HTML comments are client-side and remain in the response. Java-style comments <% // %> or <% /* */ %> are scriptlet code, not JSP comments.

Multiple choice technology architecture
  1. Parsing JSP using an XML Parser.

  2. Converting JSP into static Html content.

  3. Generating Servlet Code for the Jsp

  4. None

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

JSP translation is the first phase in the JSP lifecycle where the JSP container parses the JSP file and translates it into a Java Servlet source file (.java). This generated servlet is then compiled and executed to handle requests and generate dynamic HTML output.

Multiple choice technology architecture
  1. True

  2. False

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

JSP supports Java code through scriptlets (<% ... %>) and expressions (<%= ... %>). You can write pure Java code directly within these tags. However, best practices recommend minimizing scriptlets in favor of JSTL and custom tags for better separation of concerns.

Multiple choice technology architecture
  1. True

  2. False

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

JSP files do not need explicit configuration in web.xml because modern servlet containers automatically handle them. When a JSP is first accessed, the container translates it into a servlet and compiles it. The JSP engine built into the container processes JSP files without requiring manual mapping or configuration.

Multiple choice technology architecture
  1. <% code %>

  2. <@jsp code %>

  3. <jsp: scriptlet code />

  4. <%jsp code %>

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

JSP scriptlets use the syntax <% code %> to embed Java code that executes during page generation. The percentage symbols distinguish scriptlets from other JSP elements. Other options are incorrect - @jsp is not a valid prefix, and jsp:scriptlet is for XML-style actions, not scriptlets. Scriptlets are one of three main JSP scripting elements.

Multiple choice technology architecture
  1. WSDL

  2. UDDI

  3. SAAJ

  4. JAXR

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

WSDL (Web Services Description Language) is the standard for describing the structure of XML data exchanged between systems using SOAP. It defines the message format, operations, and protocol bindings. UDDI is for registry services, SAAJ is for SOAP messaging, and JAXR is for registry access.

Multiple choice technology architecture
  1. To validate if the XML is well formed.

  2. To pretty print the XML.

  3. To include HTML in an XML Document without getting parsed.

  4. It provides a qualified name for an XML element or attribute.

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

CDATA sections allow you to include text containing special characters like <, >, & that would otherwise be parsed as XML markup. This is useful when embedding HTML, JavaScript, or other code within XML documents. The parser treats everything inside CDATA as literal text.

Multiple choice technology architecture
  1. Add Security to SOAP.

  2. To validate if the XML is well formed.

  3. To Avoid Element Name Collisions.

  4. None of the above.

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

XML namespaces provide a way to uniquely identify elements and attributes to prevent naming conflicts when documents from different sources are combined. By qualifying names with a URI prefix, you can have two elements with the same local name but different meanings. This is essential in technologies like SOAP and XSLT.

Multiple choice technology architecture
  1. JQuery.

  2. DOJO.

  3. Both a and b.

  4. None of the above.

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

jQuery and Dojo (DOJO) are both popular JavaScript libraries used for AJAX development. jQuery provides the ajax() method and shortcuts like get()/post(), while Dojo Toolkit includes XMLHttpRequest wrappers and AJAX utilities. Both are widely used, making Option C correct.

Multiple choice technology architecture
  1. JavaScript

  2. XML

  3. MQ

  4. Java

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

While AJAX originally used XML for data exchange (hence the name Asynchronous JavaScript and XML), modern AJAX applications commonly use JSON, plain text, or other formats. However, among the given options, XML is the most historically accurate answer representing what the 'X' in AJAX stands for. MQ is a messaging protocol, and Java is a programming language.