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

Multiple choice technology web technology
  1. True

  2. False

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

DOM (Document Object Model) is a programming interface that represents HTML and XML documents as a tree of objects. Each element, attribute, and text becomes a node that can be dynamically accessed and modified with languages like JavaScript.

Multiple choice technology architecture
  1. JavaScript

  2. Multiplatform Compatible Script

  3. Web Application security vulnerability to inject client side scripting into web pages viewed in other user sessions

  4. Extended Secure Scripting

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

Cross-site scripting (XSS) is a security vulnerability that allows attackers to inject malicious client-side scripts into web pages viewed by other users. It exploits the trust a browser has for the vulnerable site. The injected scripts execute in the context of the victim's session, potentially stealing cookies or session tokens.

Multiple choice technology testing
  1. The code is perfectly valid. It sets the specified value in the web

  2. name property is incorrectly defined for the link object

  3. Syntax of Description object is incorrect.

  4. Defined link object is incorrectly used as an edit box object. Hence issuing a Set method is invalid

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

The code creates a Description object for a Link (micclass="Link", name="username"), but then attempts to use it with WebEdit().Set method. This is invalid because a Link object cannot be treated as a WebEdit. The correct approach would be to either create a WebEdit Description or use a Link method like Click.

Multiple choice technology web technology
  1. Java

  2. Java-script

  3. XML

  4. None

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

JSON (JavaScript Object Notation) is a subset of JavaScript's object literal syntax. Despite the name, JSON is language-independent and can be parsed and generated by virtually any modern programming language.

Multiple choice technology security
  1. DOM

  2. Persistent

  3. Reflected

  4. Inflicted

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

Cross-site scripting (XSS) attacks have three main types: Persistent (stored), Reflected (non-stored), and DOM-based. Option D 'Inflicted' is NOT a recognized XSS attack type - this is the correct 'not valid' answer. Options A, B, C are all valid XSS attack types, so they are incorrect answers to this negative-framed question.

Multiple choice technology security
  1. type and format

  2. type, length , format and range

  3. type, length and range

  4. length and range

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

Input validation should be as comprehensive as possible, validating the type, length, format, and range of data to prevent injection attacks like XSS. Validating only a subset of these properties (such as just type and format) leaves gaps that attackers can exploit.

Multiple choice technology security
  1. Trust user supplied data.

  2. Clean and validate all user input

  3. Use GET instead of POST.

  4. Allow the use of HIDDEN form fields.

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

To improve the overall quality of web applications, developers should abide by the following rule:

B. Clean and validate all user input.

Explanation:

Option A: Trusting user-supplied data is not a good practice, as it can lead to security vulnerabilities such as injection attacks, cross-site scripting (XSS), and cross-site request forgery (CSRF).

Option B: Clean and validate all user input is a good practice that can help prevent security vulnerabilities. Input validation can help ensure that the data is in the correct format and meets the expected criteria, while input cleaning can help remove any malicious content from the user input.

Option C: Using GET instead of POST is not a rule for improving the overall quality of web applications. GET and POST are different HTTP methods used in web applications, and each has its own advantages and disadvantages. Choosing the right method depends on the requirements of the application.

Option D: Allowing the use of HIDDEN form fields is not a rule for improving the overall quality of web applications. HIDDEN form fields can be used to store data that the user cannot see or modify, but they do not provide any security benefits.

Therefore, the correct answer is:

The Answer is: B. Clean and validate all user input.