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
-
Part of webapplication
-
Server side asp.net control
-
Document library
-
None of the above
B
Correct answer
Explanation
In ASP.NET and SharePoint, a WebPart is a server-side control that runs inside web part zones on pages, enabling users to customize content and layout. It is not a document library, nor is it merely a vague part of a web application.
-
When browser is closed
-
When the page reloads as well.
-
Only when you navigate out of the page.
-
All Of the Above
D
Correct answer
Explanation
The onunload event is triggered when the document is being unloaded from the browser. This includes closing the browser window, reloading the current page, or navigating to a new webpage. Since all these actions trigger the unload sequence, 'All Of the Above' is the correct choice.
-
Methods
-
Properties
-
Objects
-
None of The above
B
Correct answer
Explanation
innerHTML, innerText, outerHTML, and outerText are all properties of DOM Element objects in JavaScript, not methods. They are accessed as properties (element.innerHTML = 'content') and return/set values directly without requiring function invocation with parentheses.
B
Correct answer
Explanation
innerHTML is a property, not a method, so it cannot be called with parentheses. The correct syntax is document.getElementById('trial').innerHTML = 'value' to set content, or var content = document.getElementById('trial').innerHTML to read content. Adding () makes it a function call which will cause an error.
B
Correct answer
Explanation
HTML objects inherit from specific interfaces in the DOM hierarchy, not directly from Element. Form objects inherit from HTMLFormElement, Select from HTMLSelectElement, Textarea from HTMLTextAreaElement, etc. While these ultimately inherit from Element in the prototype chain, they are not 'implicitly an instance of Element' - they're instances of their specific interfaces.
B
Correct answer
Explanation
onreadystatechange is an event handler property of the XMLHttpRequest object, not a method. It's a property that you assign a function to (xhr.onreadystatechange = function(){}), not a method that you call. Methods are invoked with parentheses, properties are assigned values.
B
Correct answer
Explanation
The open() method of XMLHttpRequest only initializes the request parameters (method, URL, async flag). The actual data is sent using the send() method. For POST requests, you call open('POST', url) first, then send(data). The open() method does not send the POST data itself.
-
HTML & CSS
-
Javascript
-
Ajax
-
None of The above
-
use java script
-
put the inline script to join
-
put the style attribute into the tag and use css to create formatting
-
put the CSS attribute for formatting
C
Correct answer
Explanation
Inline styles are applied by adding the style attribute directly to an HTML tag and using CSS syntax within that attribute to format the element. Option C correctly describes this approach. Options A and B incorrectly reference JavaScript or scripts rather than CSS styling. Option D incorrectly mentions a CSS attribute rather than the style attribute with CSS code.
-
store data controls
-
store controls
-
store database
-
send requests
B
Correct answer
Explanation
HTML forms are used to create input controls for user interaction. These controls include text boxes, checkboxes, radio buttons, dropdowns, and buttons that collect user input. Option A incorrectly says 'store data controls' - forms collect but don't store data. Option C is wrong because forms don't directly store to databases, and option D is vague.
-
Phone data
-
Meta Data
-
type data
-
call data
B
Correct answer
Explanation
META tags provide metadata about the HTML document - information such as author, description, keywords, character set, and other page-level attributes. This data is used by search engines, browsers, and other tools. Options A, C, and D are nonsensical terms not related to META tag functionality.
-
print and display
-
display and echo
-
println and display
-
echo and print
D
Correct answer
Explanation
PHP has two primary language constructs for output: 'echo' and 'print'. Both display text, but echo is slightly faster and can take multiple arguments, while print returns a value (always 1) and can only take one argument. 'display' and 'println' are not PHP output functions.
B
Correct answer
Explanation
XML parsers come in three main types: SAX (event-based, reads sequentially), DOM (tree-based, loads entire document), and StAX (pull-based streaming). The answer 3 correctly counts these fundamental parsing approaches.
A
Correct answer
Explanation
SAX stands for Simple API for XML. It uses an event-driven model where the parser triggers callbacks as it encounters elements, attributes, and text, rather than loading the document into a tree structure.
B
Correct answer
Explanation
SAX is a read-only, forward-only parser that cannot modify XML documents. As it processes XML sequentially, it generates events but provides no mechanism to alter the document structure. For XML modification, DOM-based parsers are required.