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 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. Target

  2. Deploy

  3. Compile

  4. copy

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

In Ant build scripts, the Target tag is the fundamental execution unit - you invoke a target to run a specific build process. Targets contain tasks like compile, deploy, copy. When you run 'ant targetname', you're invoking a Target tag. Deploy, Compile, and Copy are tasks within targets, not the invoking mechanism.

Multiple choice technology architecture
  1. print

  2. out

  3. write

  4. echo

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

The tag in Apache Ant build tool is specifically designed to display messages to the console during build execution. This is the standard way to output build progress or debug information in Ant build scripts. The other options (print, out, write) are not valid Ant tags for console output.

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. <generator class=”hello”>

  2. <property name=”customerId” column=”CUSTOMER_ID”>

  3. <class name=”book.sample.vo.PurchaseOrderVO” table=”purchase_order”>

  4. <id name=”orderNbr” column=”ORDER_NBR” unsaved-value=”0”>

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

The tag in Hibernate mapping files includes a table attribute that specifies the corresponding database table name. While the tag maps individual columns to class attributes, only the tag defines the overall table association. Option C correctly demonstrates this with table="purchase_order".