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
-
Rules Inspector
-
Clipboard
-
DB Trace
-
Tracer
A
Correct answer
Explanation
Rules Inspector is the debugging tool that shows HTML structure and embedded properties in the UI. Clipboard shows data pages, DB Trace is for database performance, and Tracer is for execution flow - none of these show HTML/properties like Rules Inspector does.
-
Integration-Mapping
-
Technical
-
Property
-
none of the above
A
Correct answer
Explanation
Parse XML rules in PRPC are categorized under Integration-Mapping rules, which handle data transformation and mapping between external systems and PRPC. They are not Technical, Property, or any other rule category.
-
Java
-
ASP.Net
-
Perl
-
All of the above
D
Correct answer
Explanation
XSS vulnerabilities occur when web applications output unvalidated user input to HTML without proper encoding. This can happen in any language (Java, ASP.Net, Perl, PHP, Python, etc.) - it's a web application vulnerability, not language-specific.
-
WADL, WSDL, SAML
-
UDDI, WADL, WSDL
-
SOAP, SAML, WADL
-
WSDL, SOAP, SAML
D
Correct answer
Explanation
WSDL (Web Services Description Language) describes the service interface, SOAP (Simple Object Access Protocol) is the messaging protocol, and SAML (Security Assertion Markup Language) handles authentication/authorization in web services. Together these form a comprehensive web services stack: messaging (SOAP), description (WSDL), and security (SAML). WADL is for REST services, not SOAP.
-
Is a good programming practice
-
Is very useful during code reviews
-
Is the recommended practice for secure code maintenance
-
May give the attacker valuable information to perform an exploit
D
Correct answer
Explanation
HTML comments can reveal sensitive information like server versions, file paths, developer names, or debug instructions that help attackers. Comments are sent to the client and visible in view source. Good practice (A) would be removing them before production deployment.
-
JavaScript
-
VBScript
-
Both of the above
-
None of the above
C
Correct answer
Explanation
The security API provides default codecs for both JavaScript and VBScript to protect against cross-site scripting (XSS) attacks. These are the two most common client-side scripting languages that require encoding to prevent injection vulnerabilities.
-
isSafeHTML(java.lang.String context, java.lang.String input, boolean allowNull) and encodeForHTML(java.lang.String input)
-
isSafeHTML(java.lang.String context, java.lang.String input)
-
SafeHTML(java.lang.String context, java.lang.String input)
-
ValidHTML(java.lang.String context, java.lang.String input)
A
Correct answer
Explanation
isSafeHTML validates whether HTML content is safe from XSS attacks by checking for dangerous tags and attributes. encodeForHTML converts special characters like < and > to their HTML entity equivalents (<, >), preventing them from being interpreted as code. Together they provide comprehensive XSS protection.
-
JavaScript
-
VBScript
-
Both of the above
-
None of the above
C
Correct answer
Explanation
Security APIs commonly support scripting languages like JavaScript and VBScript for dynamic content execution and security validation. Option C correctly identifies both as standard supported codecs in many security frameworks.
-
isSafeHTML(java.lang.String context, java.lang.String input, boolean allowNull) and encodeForHTML(java.lang.String input)
-
isSafeHTML(java.lang.String context, java.lang.String input)
-
SafeHTML(java.lang.String context, java.lang.String input)
-
ValidHTML(java.lang.String context, java.lang.String input)
A
Correct answer
Explanation
To prevent XSS, TCS SAPI uses both isSafeHTML() to validate input and encodeForHTML() to encode it. Validation alone is insufficient - encoding is necessary to neutralize malicious scripts. The correct option A includes both prevention methods.
-
JavaScript
-
VBScript
-
Both of the above
-
None of the above
C
Correct answer
Explanation
The security API includes default scripting codecs for both JavaScript (JavaScriptCodec) and VBScript (VBScriptCodec). These codecs encode user-supplied data specifically for execution within client-side script contexts, preventing cross-site scripting (XSS) attacks by neutralising script-specific characters before output rendering.
-
isSafeHTML(java.lang.String context, java.lang.String input, boolean allowNull) and encodeForHTML(java.lang.String input)
-
isSafeHTML(java.lang.String context, java.lang.String input)
-
SafeHTML(java.lang.String context, java.lang.String input)
-
ValidHTML(java.lang.String context, java.lang.String input)
A
Correct answer
Explanation
The TCS SAPI provides isSafeHTML() and encodeForHTML() methods to prevent Cross Site Scripting (XSS) attacks. The isSafeHTML() method validates HTML content against a context to ensure it's safe, while encodeForHTML() encodes potentially dangerous characters to prevent script injection. Using these methods together provides comprehensive XSS protection.
-
Home Tool Markup Language
-
Hyperlinks and Text Markup Language
-
Hyper Text Markup Language
-
None
C
Correct answer
Explanation
HTML stands for Hyper Text Markup Language. It's the standard markup language for creating web pages. Option A is incorrect, and B incorrectly states 'Hyperlinks' instead of 'Hyper Text'.
-
<head>
-
<heading>
-
<h6>
-
<h1>
D
Correct answer
Explanation
HTML uses
through tags for headings, with being the largest and most important. The tag contains metadata, not headings. There is no tag in HTML, and is the smallest heading.
B
Correct answer
Explanation
The
tag is the correct HTML element for line breaks. There is no or tag in HTML. The self-closing form with space before slash is XHTML-compatible practice.
-
<background>yellow</background>
-
<body style="background-color:yellow">
-
<body background="yellow">
-
None
B
Correct answer
Explanation
Background color in HTML should be set using CSS within the style attribute. is correct inline CSS syntax. The tag doesn't exist in HTML. The background attribute is deprecated.