AJAX Programming MCQs with Answers

1. When a visitor clicks the submit button on a form, the ______ of each form element is sent. A. label

B. name
C. value
D. name-value pair

ANSWER: D


2. The amount of space between letters can be specified using the __________ property in a style rule.

A. letter-kerning
B. letter-leading
C. letter-spacing

D. letter-buffer

ANSWER: C


3. Which of the following is/are the valid syntax for CSS pseudo-classes.

A. selector: pseudo-class{property: value}
B. selector.class: pseudo-class{property:value}
C. Both A and B

D. None of the above

ANSWER: C


4. The …………………. property allows to specify how much space appear between the content of an element and it’s border.

A. Spacing B. Marking

C. Padding

D. Content-border

ANSWER: C


5. The …………………. property allows you to control the shape or style of bullet point in the case of unordered lists, and the style of numbering characters in ordered list.

A. list-style-type

B. list-style-layout

C. list-type-style

D. list-type

ANSWER: A


6. Which syntax is used to describe elements in CSS?

A. Protectors
B. Selectors
C. Both a and b

D. None of the above

ANSWER: B


7. Which of the following is the ultiate element selection method?

A. querySelectorAll()
B. querySelector()
C. queryAll()

D. query()

ANSWER: A


8. The C in CSS stands for

A. Continuous
B. Cascaded
C. Conventional

D. Cascading

ANSWER: D


9. The latest version of CSS is

A. CSS1

B. CSS2

C. CSS3

D. CSS4

ANSWER: C


10. Which of the following is an example of a Shortcut Property?

A. border

B. font
C. text
D. All of the above

ANSWER: D



11. Which of the following is the default positioning element with CSS?

A. relative
B. static
C. absolute

D. None of the above

ANSWER: B


12. The ____________ selector is used to specify a style for a single, unique element

A. Id

B. class

C. text

D. Bit

ANSWER: A


13. The ____________ property specifies which sides of an element other floating elements are not allowed.

A. cleared
B. clear
C. float
D. Both A and B above

ANSWER: B


14. What is CSS Float?
A. allows other elements to wrap around an element

B. element can be pushed to the left to right
C. both a and b above
D. element can be pushed to any direction

ANSWER: C


15. To specify table border in CSS, ____________ property is used

A. tbl-border
B. table-border
C. tb-border

D. border ANSWER: D


16. _________ property can be used to Increase or decrease the space between words

A. space

B. word-spacing
C. word-space
D. Both b and c above

ANSWER: B


17. ______________ property specifies an image to use as the background of an element

A. backg-img
B. backg-image
C. background-img

D. background-image

ANSWER: D


18. Multiple external style sheets cannot be referenced inside a single HTML document

A. True

B. False
C. None of the above

D. Not Correct

ANSWER: B


19. Elements in CSS cannot be positioned unless the positioning property is set first

A. True

B. False
C. None of the above

D. Not Correct

ANSWER: A


20. The font-size value can be an absolute, or relative size

A. True

B. False
C. None of the above

D. Not Correct

ANSWER: A



21. Which of the following are recommended HTML approaches you use to provide spacing in a Web page?

A. using a BR tag to apply a line break
B. using a P tag to apply a paragraph break
C. using a CB tag to apply a column break
D. using a HR tag to apply a visual section break

ANSWER: C


22. Which of the following 4 technologies was not built specifically to coexist well with HTML?

A. CSS

B. DHTML

C. SGML

D. XML

ANSWER: C


23. Which of the following is true of XSLT?
A. One XSLT document is used to convert an XML document into many different types of documents.

B. XSLT processors are embedded in most of the popular Web browsers used to browse Web content.

C. XSLT generates output through the use of templates that connect to elements in an XML document.

D. XSLT includes XSL-FO (for Formatting Objects) technology that is also managed by the W3C

ANSWER: C


24. Which of the following is the best description of the relationship between HTML and XHTML

A. XHTML is a subset of HTML
B. HTML is a subset of XHTML
C. HTML is an XML encoding of XHTML

D. XHTML is an XML encoding of HTML

ANSWER: D


25. XHTML is an XML encoding of HTML

A. Extensive Hypertext Makeup Language

B. Extensible Hypertext Markup Language

C. Expansive Hyperlink Markup Language

D. None of the above

ANSWER: B


26. Which of the following is a valid XSLT iteration command

A. for

B. for-all

C. for-each

D. in-turn

ANSWER: C


27. What is an advantage of XML compared to HTML?
A. XML works on more platforms.
B. XML is suited to using Web pages as front ends to databases.

C. XML was designed for portable phones.
D. XML is simpler to learn than HTML.

ANSWER: B


28. The following best describes the development of XML.
A. XML developed from HTML because WEB browsers became more powerful.
B. XML is designed as a replacement because SGML can not be used for document development.
C. XML builds on HTMLs ability to provide content to virtually any audience by adding the power of

intelligent content.
D. XML is the modern replacement for HTML and SGML, taking the good points from each, making

both of those languages obsolete.

ANSWER: C


29. Which of the following statements is true:

A. XML is a direct subset of SGML
B. SGML is an application of HTML
C. XML is a kind of dynamic HTML

D. XHTML is XML rewritten in HTML

ANSWER: A


30. What is a qualified name?
A. Any name conforming to the XML Names specification

B. A name having prefix and local name separated by a colon

C. A name applying only to qualified elements and attributes

D. None of the above

ANSWER: C



What is a NCName
A. A Non-Common Name
B. A Non-Conforming Name
C. A Non-Colonized Name
D. None of the above
ANSWER: C


From what set of names do NCNames derive?
A. Any combination of characters allowable in XML
B. Any names conforming to XML Names, minus the colon
C. Any names for elements and attributes within the DTD to which the namespace refers
D. None of the above.
ANSWER: B


Which of the following is used to specify the attribute list of an element
A. ATTLIST
B. ?ATTLIST
C. !ATTLIST
D. #ATTLIST
ANSWER: C


Well formed XML document means(most appropriate)
A. it contains a root element
B. it contain an element
C. it contains one or more elements
D. must contain one or more elements and root element must contain all other elements
ANSWER: D


Attribute of the document interface in DOM is/are (i)doctype (ii)implementation (iii)documentElement which are read only attributes
A. (i) only
B. (ii) only
C. (ii),(iii) only
D. all
ANSWER: D


XML DSOs has the property for the number of pages of data the recordset contains
A. count
B. number
C. pageCount
D. pageNumber
ANSWER: C


What does DTD stand for?
A. Direct Type Definition
B. Document Type Definition
C. Do The Dance
D. Dynamic Type Definition
ANSWER: B


DTD includes the specifications about the markup that can be used within the document, the specifications consists of all EXCEPT
A. the browser name
B. the size of element name
C. entity declarations
D. element declarations
ANSWER: A


Parameter entities can appear in
A. xml file
B. dtd file
C. xsl file
D. Both 1 and 2
ANSWER: B


In XML
A. the internal DTD subset is read before the external DTD
B. the external DTD subset is read before the internal DTD
C. there is no external type of DTD
D. there is no internal type of DTD
ANSWER: A



What is the purpose of the method nodeMap.setNamedItem()?
A. Sets ID
B. Sets attribute node
C. Sets element name
D. None of the above
ANSWER: B


How is everything treated in HTML DOM?
A. Node
B. Attributes
C. Elements
D. All of the mentioned
ANSWER: A


What is the purpose of the Legacy DOM ?
A. Makes the scripting easier
B. Allows access to few keys and elements
C. Both a and b
D. None of the mentioned
ANSWER: B


What does the NamedNodeMap object represent in the HTML DOM?
A. Unordered collection of elements
B. Unordered collection of attributes
C. Unordered collection of nodes
D. All of the mentioned
ANSWER: D


Which of the following is a type of HTML DOM?
A. Legacy DOM
B. W3C DOM
C. IE4 DOM
D. All of the mentioned
ANSWER: D


Which object is the top of the hierarchy?
A. Window Object
B. Document Object
C. Form Object
D. Form Control Elements
ANSWER: A


What is the purpose of the Attr object in the HTML DOM?
A. Used to focus on a particular part of the HTML page
B. HTML Attribute
C. Used to arrange elements
D. None of the mentioned
ANSWER: B


The central object in a larger API is known as
A. Document Object Material
B. Document Object Model
C. Binary Object Model
D. None of the mentioned
ANSWER: B


The Text and Comment is part of
A. CharacterData
B. Document
C. Attr
D. Element
ANSWER: A


Which of the following can be used to select HTML elements based on the value of their name attributes?
A. getElementByName()
B. getElementsByName()
C. getElementsName()
D. getElementName()
ANSWER: B

error: Content is protected !!