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
A Correct answer
Explanation

JSP allows embedding pure Java code through scriptlets (<% ... %>). You can write any valid Java code inside these scriptlet blocks. However, this is considered poor practice in modern JSP development - JSTL tags, EL expressions, and MVC patterns are preferred. The question asks about capability, not best practices.

Multiple choice technology
  1. True

  2. False

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

Modern servlet containers automatically map JSP files - you don't need to configure them in web.xml. The container compiles JSPs into servlets on first access. web.xml configuration is only needed for Servlets and custom URL mappings.

Multiple choice technology
  1. <% code %>

  2. <@jsp code %>

  3. <jsp: scriptlet code />

  4. <%jsp code %>

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

The scriptlet element syntax in JSP is <% code %>. Scriptlets allow embedding Java code directly into JSP pages. The code inside runs during the request processing phase and can generate dynamic content.

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

  2. <!-- comment -->

  3. <% // comment %>

  4. <% /* comment */ %>

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

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

JSP comments use <%-- comment --%>. These are server-side comments that are completely removed from the generated HTML - the browser never sees them. HTML comments would be visible to users viewing page source.

Multiple choice technology programming languages
  1. speed up database queries

  2. encrypt passwords

  3. transform XML into HTML

  4. cache html pages

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

XSLT (Extensible Stylesheet Language Transformations) is designed specifically for transforming XML documents into other formats, most commonly HTML for web display. It uses templates and XPath to match and convert XML structure. Options A (database), B (encryption), and D (caching) are unrelated to XSLT's purpose.

Multiple choice technology programming languages
  1. Extensible Book Notation Format

  2. a replacement for the SAX XML parser

  3. the leader of the free software foundation

  4. a syntax for defining grammar

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

EBNF (Extended Backus-Naur Form) is a notation for formally defining the grammar of programming languages and other formal languages. It extends the original BNF notation with additional features like repetition, optional elements, and grouping, making it more expressive for specifying syntax rules.

Multiple choice technology platforms and products
  1. Parse Data

  2. Parse XML

  3. Render XML

  4. Transform XML

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

The Transform XML activity is the resource that uses the Saxon-B XSLT 2.0 engine for XSLT transformations in TIBCO BusinessWorks. Parse Data and Parse XML are for parsing different formats, and Render XML is for generating XML output - none of these involve XSLT transformation engines.

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 refers to the process where the JSP container converts the JSP file into a corresponding Servlet source code. This generated servlet is then compiled. The servlet handles requests by generating HTML output. Option A is wrong because JSP uses its own parser, not generic XML. Option B is wrong because JSP becomes dynamic servlet code, not static HTML.

Multiple choice technology architecture
  1. True

  2. False

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

JSP (JavaServer Pages) allows embedding Java code directly within the page using scriptlets (<% %>) and expressions (<%= %>). You can write pure Java code including variable declarations, method calls, control flow statements, and expressions. The JSP container translates this Java code into servlet code during compilation.

Multiple choice technology architecture
  1. True

  2. False

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

JSP pages can include both other JSP pages and HTML pages. The standard action can include any resource, including HTML pages, at runtime. The <%@ include %> directive can include static content like HTML files at translation time. There is no restriction that only JSP pages can be included.

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.