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
-
(selector).action()
-
$(action).selector()
-
$(selector).action()
-
selector.action()
C
Correct answer
Explanation
The basic jQuery syntax is $(selector).action(), where $ is the jQuery alias, selector identifies HTML elements using CSS syntax, and action() is the jQuery method to perform. This pattern is consistent throughout jQuery: first select elements, then perform actions on them. Option B reverses the order, while A and D miss the $ symbol or parentheses.
-
prepend
-
middle
-
append
-
before
B
Correct answer
Explanation
jQuery provides prepend() (insert at beginning), append() (insert at end), and before() (insert before element) as standard DOM manipulation methods. 'middle' is not a valid jQuery method for HTML manipulation, making it the correct answer to this negative question.
-
constructors of jquery
-
html tags of jquery
-
callback
-
selectors
D
Correct answer
Explanation
jQuery selectors are used to find and manipulate HTML elements in the DOM. Selectors use CSS syntax to identify one or more elements, which can then be modified using jQuery methods. Constructors like $() wrap selections, callbacks are functions executed after events, and jQuery doesn't have 'html tags' as a concept.
-
css(object)
-
css(name)
-
css(name,value)
-
css({properties})
A
Correct answer
Explanation
This question is poorly designed. Options B, C, and D are all valid jQuery CSS method syntaxes, while option A (css(object)) is ambiguous. If 'object' means a plain object, then css({properties}) already covers that case. The question likely intends to test knowledge of valid CSS() method signatures, but all standard syntaxes are represented in B, C, and D, making the question confusing.
-
Utilities
-
server side validations
-
JavaScript Effects and animations
-
HTML DOM traversal and modification
B
Correct answer
Explanation
jQuery is a client-side JavaScript library that runs in the browser and cannot perform server-side validations. It provides utilities, effects/animations, and DOM manipulation, but server-side validation requires server-side code like PHP, Node.js, or ASP.NET.
-
("p").css("background-color","yellow");
-
$("p").css("background-color","yellow")
-
$("p").css("background-color","yellow");
-
$("p").css("back-color","yellow");
C
Correct answer
Explanation
The correct jQuery syntax requires the $ selector function, followed by the .css() method. Option C is correct: $("p").css("background-color","yellow"); - the $ creates a jQuery object, .css() takes two string arguments (property and value), and the semicolon terminates the statement. Option A is missing the $, Option B is missing the semicolon, and Option D uses an incorrect property name.
-
XML
-
WSDL,XML
-
SOAP
-
All of the above
D
Correct answer
Explanation
BPEL is built on all three technologies: it's an XML-based language, uses WSDL to define service interfaces, and relies on SOAP for message exchange. These form the foundation of BPEL's web service orchestration capabilities.
-
eXtensive Markup Language
-
eXtensive Markup List
-
eXtension Markup List
-
eXtensible Markup Language
D
Correct answer
Explanation
XML stands for eXtensible Markup Language. It was designed to store and transport data in a structured, both human and machine-readable format. The 'extensible' means users can define their own tags and document structures.
B
Correct answer
Explanation
The three main types of XML parsers are DOM (Document Object Model) which loads the entire document as a tree, SAX (Simple API for XML) which is event-driven and processes sequentially, and StAX (Streaming API for XML) which uses a pull-based model. Other options are incorrect as they don't match the standard parser types.
A
Correct answer
Explanation
SAX (Simple API for XML) is a sequential access parser that uses event callbacks to notify the application as it reads through the XML document.
B
Correct answer
Explanation
SAX is a read-only, event-based parser that cannot modify XML documents. It only provides sequential access for reading. To modify XML, you would need DOM or other tree-based parsers that load and allow manipulation of the document structure.
A
Correct answer
Explanation
DOM (Document Object Model) parser reads the entire XML document into memory and builds a tree structure, making it memory-intensive for large files.
B
Correct answer
Explanation
StAX (Streaming API for XML) is a pull-based parser where the application controls parsing by requesting events from the parser. This contrasts with SAX which is push-based (parser drives the application). The claimed answer correctly identifies that StAX is not push-based.
-
Methods
-
Properties
-
Objects
-
None of The above
B
Correct answer
Explanation
innerHTML, innerText, outerHTML, and outerText are properties of DOM Element objects, not methods. They are accessed like element.innerHTML (without parentheses), not invoked as functions. Methods would be called with parentheses.
B
Correct answer
Explanation
innerHTML is a property of DOM elements, not a method. It should be accessed as document.getElementById('trial').innerHTML (without parentheses), not innerHTML(). The parentheses would attempt to call it as a function, which is incorrect syntax.