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 web technology
  1. To define title of the HTML document

  2. To instruct browser where to find stylesheets, metadata etc

  3. To show additional information about an element as a tooltip text when the mouse moves over it

  4. None of the above

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

The title attribute provides additional information about an HTML element that appears as a tooltip when users hover their mouse over it. It's not used for defining the document title (that's ) or for linking stylesheets (that's ). This is a fundamental HTML attribute for improving user experience with contextual hints.

Multiple choice technology web technology
  1. toggle

  2. label

  3. caption

  4. None of the above

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

The tag associates text with a form control, allowing users to click the text to toggle checkboxes or radio buttons. This improves usability and accessibility - clicking anywhere on the label activates the control. The 'toggle' attribute doesn't exist in HTML, and is for table titles.

Multiple choice technology web technology
  1. POST allows users to bookmark URLs with parameters.

  2. The POST method should not be used when large amount of data needs to be transferred.

  3. POST allows secure data transmission over the http method.

  4. POST method sends data in the body of the request.

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

The POST method sends data in the body of the HTTP request, not in the URL like GET. This allows larger data transfers and keeps parameters out of the browser history. However, POST itself is not inherently secure without HTTPS.

Multiple choice technology web technology
  1. PHP can be used to develop web applications

  2. PHP makes a website dynamic.

  3. PHP applications can not be compiled.

  4. PHP can not be embedded into html.

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

This question asks which statement is NOT true (i.e., which is false). Option D claims 'PHP can not be embedded into html,' which is a false statement because PHP CAN indeed be embedded into HTML using PHP tags. Options A, B, and C are all true statements: PHP can develop web apps, PHP makes websites dynamic by generating content server-side, and PHP scripts are interpreted rather than compiled (though modern PHP can be compiled via various tools, the statement uses 'can not' which is technically accurate for traditional usage).

Multiple choice technology web technology
  1. <? ?>

  2. <script language=”php”> </script>

  3. <% %>

  4. <?php ?>

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

The tag is the most portable PHP delimiter because it is XML-compliant and works in XHTML documents. Short tags like ?> depend on php.ini configuration and may not work in all environments. The tag format is verbose and rarely used. ASP-style tags <% %> are deprecated and removed in PHP 8. Using <?php ensures your code works across different server configurations and XML-based document types.

Multiple choice technology programming languages
  1. increment

  2. sequence

  3. hilo

  4. foreign

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

The tag in Hibernate mapping files uses attributes to specify the identifier generation strategy. Common attributes include increment (identity column), sequence (database sequences), hilo (high/low algorithm), and foreign (uses foreign key value).

Multiple choice technology web technology
  1. Declarations

  2. Scriptlets

  3. Expressions

  4. Include

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

JSP has three main scripting elements: Declarations (<%! %>) for declaring variables/methods, Scriptlets (<% %>) for embedding Java code, and Expressions (<%= %>) for outputting values. Directives and actions are not considered scripting elements.

Multiple choice technology web technology
  1. 5

  2. 3

  3. 4

  4. 2

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

JSP defines exactly three scripting elements: Declarations, Scriptlets, and Expressions. These correspond to the three ways of embedding Java code in JSP pages - for declarations, procedural code, and output expressions respectively.

Multiple choice technology web technology
  1. <js>

  2. <javascript>

  3. <script>

  4. <scripting>

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

The HTML5 specification defines the `element for embedding or referencing executable client-side scripts, such as JavaScript code. Non-standard elements like<js>,<javascript>, and<scripting>` are unrecognized by modern web browsers and will not execute the enclosed code blocks.

Multiple choice technology web technology
  1. "Hello World"

  2. document.write("Hello World")

  3. response.write("Hello World")

  4. ("Hello World")

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

document.write('Hello World') is valid JavaScript syntax that outputs text directly to the HTML document. This method writes during page parsing and is commonly used for simple output scenarios. Option A is just a string literal without any execution context. Option C uses ASP syntax (response.write), not JavaScript. Option D is syntactically incomplete - just parentheses without a function call.

Multiple choice technology web technology
  1. The overall structure of the XML message

  2. The conventions representing the remote procedure call in the XML message

  3. Both

  4. None

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

SOAP defines the overall XML message structure, including its envelope, header, and body components. It also specifies conventions for representing remote procedure calls and responses within the message. Consequently, both functions are essential parts of the SOAP specification, making other options incomplete.