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
-
noframes
-
iframe
-
noframesupport
-
None of the above
A
Correct answer
Explanation
The HTML tag is used to provide fallback content for browsers that do not support framesets. The tag embeds inline frames, while `` is a non-existent, invalid HTML tag.
-
To define title of the HTML document
-
To instruct browser where to find stylesheets, metadata etc
-
To show additional information about an element as a tooltip text when the mouse moves over it
-
None of the above
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.
-
toggle
-
label
-
caption
-
None of the above
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.
-
POST allows users to bookmark URLs with parameters.
-
The POST method should not be used when large amount of data needs to be transferred.
-
POST allows secure data transmission over the http method.
-
POST method sends data in the body of the request.
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.
-
PHP can be used to develop web applications
-
PHP makes a website dynamic.
-
PHP applications can not be compiled.
-
PHP can not be embedded into html.
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).
-
<? ?>
-
<script language=”php”> </script>
-
<% %>
-
<?php ?>
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.
-
<generator>
-
<session-factory>
-
<class-name>
-
<property-name>
-
increment
-
sequence
-
hilo
-
foreign
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).
-
<many-to-one="product" class="Product" cloumn="PRODUCT_ID"/>
-
<many-to-one:="product" class:="Product" cloumn:="PRODUCT_ID">
-
<many-to-one="product" class="Product" cloumn="PRODUCT_ID">
-
<many-to-one="product" class="PRODUCT_ID" cloumn="Product"/>
-
Declarations
-
Scriptlets
-
Expressions
-
Include
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.
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.
-
<js>
-
<javascript>
-
<script>
-
<scripting>
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.
-
"Hello World"
-
document.write("Hello World")
-
response.write("Hello World")
-
("Hello World")
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.
-
'This is a comment
-
<!--This is a comment-->
-
/This is a comment/
-
//This is a comment
-
The overall structure of the XML message
-
The conventions representing the remote procedure call in the XML message
-
Both
-
None
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.