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 platforms and products
  1. Name of the schema.

  2. Name of the Root node in the xml document

  3. Namespace.typename of the project in which the schema has been deployed

  4. Name of the xml document

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

When creating XML-based facts for the Business Rules Engine, the Document Type property must use the fully qualified name format: Namespace.TypeName. This allows BRE to correctly resolve and instantiate the schema. Using just the schema name or root node is insufficient.

Multiple choice technology security
  1. URL/HTML encoding

  2. Blacklisting

  3. Whitelisting

  4. Parameterized SQL queries in application code/configuration

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

Cross-Site Scripting (XSS) occurs when untrusted data is executed as code. To display special characters like tags safely without execution, you must HTML-encode them - converting < to &lt;, > to &gt;, etc. This renders the characters visually but they're not parsed as HTML/JavaScript. Option A (URL/HTML encoding) is correct. Blacklisting (B) is unreliable, whitelisting (C) doesn't solve display, and parameterized SQL (D) prevents SQL injection, not XSS.

Multiple choice technology web technology
  1. True

  2. False

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

ASP.NET pages can only contain one server-side Form tag because the page framework expects a single form for postback processing. Multiple runat="server" forms would cause postback event handling conflicts since the framework can only determine which form caused the postback if there is one form.

Multiple choice technology security
  1. Java

  2. ASP.Net

  3. Perl

  4. All of the above

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

To answer this question, let's go through each option to understand which languages are vulnerable to Cross-Site Scripting (XSS) attacks:

Option A) Java - Java itself is not vulnerable to XSS attacks. However, if a Java application uses web technologies like servlets, JSP, or JavaServer Faces (JSF), then the vulnerabilities in these technologies can lead to XSS attacks. Therefore, Java can be vulnerable to XSS attacks indirectly.

Option B) ASP.Net - Similar to Java, ASP.Net itself is not vulnerable to XSS attacks. However, if an ASP.Net application does not properly handle user input or output encoding, it can be vulnerable to XSS attacks. Therefore, ASP.Net can be vulnerable to XSS attacks indirectly.

Option C) Perl - Perl itself is not vulnerable to XSS attacks. However, if a Perl application does not properly handle user input or output encoding, it can be vulnerable to XSS attacks. Therefore, Perl can be vulnerable to XSS attacks indirectly.

Option D) All of the above - This option is correct. While the languages themselves (Java, ASP.Net, and Perl) are not directly vulnerable to XSS attacks, the vulnerabilities arise when these languages are used in web applications and proper security measures are not implemented. Therefore, all of the above languages can be vulnerable to XSS attacks indirectly.

The correct answer is D) All of the above. These languages can be vulnerable to XSS attacks when used in web applications that do not handle user input or output encoding properly.

Multiple choice technology security
  1. Java

  2. ASP.Net

  3. Perl

  4. All of the above

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

To solve this question, the user needs to have knowledge of Cross Site Scripting (XSS) and the programming languages that can be vulnerable to it.

Cross Site Scripting (XSS) is a type of web vulnerability that allows attackers to inject malicious code into web pages viewed by other users. This can result in the theft of sensitive data, such as login credentials, bank account information, and other personal information.

Now, let's go through each option and explain why it is right or wrong:

A. Java: Java web applications can be vulnerable to XSS attacks if they do not properly sanitize user input. This makes option A partially correct.

B. ASP.Net: ASP.Net web applications can also be vulnerable to XSS attacks if they do not properly sanitize user input. This makes option B partially correct.

C. Perl: Perl web applications can also be vulnerable to XSS attacks if they do not properly sanitize user input. This makes option C partially correct.

D. All of the above: Since options A, B, and C are all partially correct, option D is the correct answer. All of the above languages are vulnerable to XSS attacks if they do not properly sanitize user input.

Therefore, the correct answer is: D

Multiple choice technology security
  1. Is a good programming practice

  2. Is very useful during code reviews

  3. Is the recommended practice for secure code maintenance

  4. May give the attacker valuable information to perform an exploit

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

HTML comments visible in source code can reveal sensitive information to attackers including: debug data, server-side file paths, commented-out security code, developer names, and implementation details. This reconnaissance information helps attackers craft targeted exploits. Comments should be removed before production deployment.

Multiple choice technology architecture
  1. Cocoon

  2. Log4j

  3. Axis

  4. Struts

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

Apache Cocoon is an XML publishing framework built specifically to interact with various data sources (databases, file systems, web services) and transform content into multiple output formats (HTML, PDF, WAP, etc.). It uses a pipeline processing model based on SAX (Simple API for XML) to efficiently handle XML transformations. Log4j is for logging, Axis is for SOAP web services, and Struts is an MVC web framework - none are XML publishing frameworks like Cocoon.

Multiple choice technology testing
  1. 0, 10, and 30 characters in length.

  2. 4, 5, 25 and 26 characters in length.

  3. 5, 6, 24 and 25 characters in length.

  4. from 5 to 25 characters inclusively.

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

Boundary testing requires testing at the exact boundaries (4, 5, 25, 26) to verify correct handling of minimum, maximum, and just-outside-bounds values. Option C only tests within valid range (5, 6, 24, 25) and misses the critical boundary failure cases, while Option A includes arbitrary values.

Multiple choice technology testing
  1. Avoid correlation error

  2. Avoid Text Not Found Error

  3. Both of these

  4. None of these

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

web_set_max_html_param_len() is used to set the maximum length for HTML parameters during correlation. When dynamic values in HTML responses exceed the default limit, correlation fails - this function prevents those correlation errors by extending the buffer size. It does not handle Text Not Found errors, which are a different issue.

Multiple choice technology testing
  1. Web_create_xml_param

  2. Web_reg_save_param

  3. Web_create_html_param

  4. Web_create_html_param_ex

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

The three main correlation functions in LoadRunner are web_reg_save_param() for basic correlation, web_create_html_param() for HTML-based correlation, and web_create_html_param_ex() for extended HTML correlation with more options. web_create_xml_param() exists but is less commonly used for standard HTML correlation. The question asks for the three functions, not four.

Multiple choice technology web technology
  1. &

  2. <and>amp;</and>

  3. &&amp;

  4. &amp;

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

In HTML, the ampersand character (&) is a special character used to start entity references. To display an actual & on screen, you must use the & entity. The entity & renders as a single & character when the HTML is displayed in a browser.