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 security
  1. isSafeHTML(java.lang.String context, java.lang.String input, boolean allowNull) and encodeForHTML(java.lang.String input)

  2. isSafeHTML(java.lang.String context, java.lang.String input)

  3. SafeHTML(java.lang.String context, java.lang.String input)

  4. ValidHTML(java.lang.String context, java.lang.String input)

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology security
  1. JavaScript

  2. VBScript

  3. Both of the above

  4. None of the above

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology security
  1. isSafeHTML(java.lang.String context, java.lang.String input, boolean allowNull) and encodeForHTML(java.lang.String input)

  2. isSafeHTML(java.lang.String context, java.lang.String input)

  3. SafeHTML(java.lang.String context, java.lang.String input)

  4. ValidHTML(java.lang.String context, java.lang.String input)

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology web technology
  1. Home Tool Markup Language

  2. Hyperlinks and Text Markup Language

  3. Hyper Text Markup Language

  4. None

Reveal answer Fill a bubble to check yourself
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'.

Multiple choice technology enterprise content management
  1. XML

  2. Perl

  3. Java

  4. .Net

  5. Bea Portal

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

Interwoven TeamSite supports multiple programming languages and platforms including XML for content structure, Perl for scripting, Java for enterprise applications, .NET for Windows integration, and BEA Portal for portal deployment. This multi-platform support is a key enterprise feature.

Multiple choice technology web technology
  1. Store data

  2. Write data

  3. Read data

  4. Read and write data

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

XML files are commonly used with Flash/SWF files to read external data into the application. While XML can technically both read and write data, the option states 'Read data' as the correct answer, which aligns with the most common use case. Flash applications primarily consume XML data to populate content dynamically.

Multiple choice technology web technology
  1. Swf will not be published

  2. Data will not be shown in swf

  3. Data will be displayed in swf file

  4. Swf will generate a new xml file automatically

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

When a SWF file loads data from an external XML file, it reads that data at runtime. If the XML file is deleted after the SWF is published, the SWF cannot access the data source, so the data will not be displayed. The SWF itself remains functional but cannot show the XML-dependent content.

Multiple choice technology programming languages
  1. Length

  2. Format

  3. Informat

  4. Label

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

In SAS, variable attributes define the properties of a variable. The name identifies the variable, type determines if it's numeric or character, length defines storage size, label provides a descriptive text, format controls output appearance, and informat specifies how to read raw data values. All four options listed are valid SAS variable attributes.

Multiple choice technology web technology
  1. ruby script/generate scaffold recipe [name,type] => [string,string]

  2. ruby scaffold recipe [name,type] => [string,string]

  3. ruby script/generate scaffold recipe name=string type=string

  4. ruby script/generate scaffold recipe name:string type:string

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

In Rails (especially older versions with script/generate), scaffolding syntax uses field:type pairs separated by spaces. Option D correctly shows name:string type:string, which specifies two fields with their data types. The other options use incorrect syntax like arrows, equals signs, or malformed type declarations.

Multiple choice technology security
  1. JavaScript

  2. VBScript

  3. Both of the above

  4. None of the above

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

The security API supports both JavaScript and VBScript codecs by default because these are the two most common scripting languages used in cross-site scripting (XSS) attacks. Encoding output for both languages provides comprehensive protection against XSS vulnerabilities. Supporting only one would leave applications vulnerable to attacks using the other.

Multiple choice technology security
  1. isSafeHTML(java.lang.String context, java.lang.String input, boolean allowNull) and encodeForHTML(java.lang.String input)

  2. isSafeHTML(java.lang.String context, java.lang.String input)

  3. SafeHTML(java.lang.String context, java.lang.String input)

  4. ValidHTML(java.lang.String context, java.lang.String input)

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

To prevent Cross-Site Scripting (XSS) attacks, TCS SAPI provides isSafeHTML() which validates HTML content for dangerous patterns, and encodeForHTML() which encodes special characters to prevent script execution. The isSafeHTML method checks if HTML input is safe for a given context, while encodeForHTML converts characters like < and > to safe HTML entities. Using both provides defense-in-depth against XSS vulnerabilities.