WT MCQ For Insem
WT MCQ For Insem
Singh
UNIT 1
1. ____ is used to store the data within the documents on the
server.
(A) XML
(B) HTML
(C) DHTML
(D) CG
Ans: A
2. The tag used to add images to the HTML document is ____
(A) <FONT>
(B) <HR>
(C) <HI>
(D) <IMG>
Ans: D
3. The HTML and HTTP standard are defined by ____
(A) Web client
(B) Internet association
(C) WWW consortium
(D) WWW
Ans: C
4. The <Font> tag is similar to ____
(A) <BIG>tag
(B) <SMALL>tag
(C) <MARQUEE>tag
(D) <BIG>and<Small> tags
Ans: D
5. Which language is used for creating Web Pages?
(A) PASCAL
(B) C
(C) HTML
(D) BASIC
Ans: C
6. What is the abbreviation of HTTP?
(A) Hypertext tag path
(B) Hyper Text Transfer Protocol
(C) Hypertext transfer path
(D) None
Ans: B
7. HTML document should begin with the ____
(A) <HEAD> tag
(B) <TITLE> tag
(C) <BODY> tag
(D) <HTML> tag
Ans: D
8. GIF is the abbreviation for ___
(A) Graphics Interchange Format
(B) Graphics Instruction Format
(C) Graphics Item Format
(D) Graphics Information Format
Ans: A
9. A popular way of linking many documents was ___
(A) Notepad
(B) SGML
(C) Gopher
(D) Computer
Ans: C
10. Who send the requisition for web pages to the web servers?
(A) Node
(B) System
(C) Web clients
(D) Web customer
(D) Computer
Ans: C
11. Which tag is used to identify the author’s name of the web
document?
(A) Anchor tag
(B) Meta tag
(C) Title tag
(D) Font tag
Ans: B
12. Which attribute can be used to change the color of the links?
(A) Link
(B) ALINK
(C) VLINK
(D) All the above
Ans: D
13. Which indicates the beginning of an effect?
(A) Start tag
(B) End tag
(C) Tag
(D) None of the given
Ans: A
14. Which option on the menu can be used to insert rows and
columns?
(A) Insert
(B) Tool
(C) Table
(D) Format Ans: C
15. Which of the following achieves the effect of using script
language?
(A) DHTML
(B) XML
(C) HTML
(D) CGI
Ans: A
16. Forms are created by the attributes
(A) Action and Method
(B) Value and Method
(C) Method and Target
(D) Action and Target
Ans: A
17. Name any one text editor program.
(A) HTML
(B) FrontPage
(C) Notepad
(D) MS Paint
Ans: C
18. Which section of the Web page will contain Meta tags?
(A) Body section
(B) Heading section
(C) (a) or (b)
(D) None
Ans: C
19. What are the two segments of a style tag?
(A) Selector and property
(B) Name and content
(C) Head section and body section
(D) None
(D) Action and Target
Ans: A
20. ____ attribute is used to display an alternate message.
(A) Size
(B) ALT
(C) ALIGN
(D) SRC
Ans: B
21. Check boxes are used _____
(A) To enable option
(B) To disable option
(C) To create lists
(D) To enable or disable option
Ans: D
22. ____ Icon displays list of fonts that can be used.
(A) Text Size Icon
(B) Italics
(C) Change Font Icon
(D) Bold
Ans: C
23. Which tag is used to change the default characteristics of a
particular tag in the entire web document wherever that tag is
used?
(A) Meta tag
(B) Style tag
(C) Marquee tag
(D) Heading tag
Ans: B
24. The ___ attribute is used to specify the width of the table.
(A) CELLPADDING
(B) WIDTH
(C) CELLSPACING
(D) BORDER
Ans: B
26. Which one of the following indicates how light or dark a color
appears on the web page?
(A) Value
(B) shade
(C) Hue
(D) Tint
Ans: A
27. The communication protocol used by the Internet to transfer
hypertext documents is ___
(A) Hyper Text Internet Protocol
(B) Hyper Text Transfer Protocol
(C) Internet protocol
(D) File Transfer Protocol
Ans: B
28. The instructions indicated to the browser to display a
document are called ___
(A) Codes
(B) Tags
(C) Programs
(D) Statements
Ans: B
29. The primary colors are ____
(A) Red, green, yellow
(B) Red, white, yellow
(C) Red, green, blue
(D) Red, yellow, blue (Ans: C)
30. How many different colours can GIF contain?
(A) 64
(B) 156
(C) 256
(D) 264
Ans: C
31. Transferring your HTML code from one machine to server is
known as ___
(A) Indexing
(B) Hosting
(C) Serving
(D) Sorting
Ans: B
32. The _____ attribute is used to specify the value to be stored in
the variable if an option is selected.
(A) SIZE
(B) VALUE
(C) CHECKED
(D) TYPE
Ans: B
33. Which of the following programs are likely to become very
popular?
(A) HTML, XML
(B) OBJECT, Applet
(C) DHTML, XML
(D) HTML, DHTML
Ans: C
34. _____ contains the document itself.
(A) Structure
(B) Tag
(C) Head section
(D) Body section
Ans: D
35. Which of the following enables the computers around the world
to be connected together?
(A) Assembler
(B) Compiler
(C) HTML document
(D) Internet
Ans: C
36. The popular browser used to surf the Internet is
(A) Netscape Composer
(B) Notepad
(C) Microsoft Internet Explorer
(D) Microsoft word
Ans: C
37. Which is the formal description of message formats and rules
to be followed by computers?
(A) Standards
(B) Protocol
(C) Syntax
(D) Language
Ans: B
38. The CELLSPACING attribute is used to ___
(A) Specify the colour of the border
(B) Specify the thickness of the border
(C) Specify the space between cells
(D) Specify the space between text and border
Ans: C
39. Interactive documents that can be created using a feature of
HTML are called ____
(A) Tables
(B) Forms
(C) Files
(D) Frames
Ans: B
40. _____ are used to allow the user to select one of the options
displayed.
(A) Radio buttons
(B) Text boxes
(C) Check boxes
(D) Password controls
Ans: A
41. _____ is used to separate the attributes in the selected
segment of a style tag.
(A) :
(B) ;
(C) ,
(D) *
Ans: B
42. The image tag is always used with _____ attribute.
(A) Size
(B) SRC
(C) Color
(D) Font
Ans: B
43. The _____ attribute specifies the bullet style.
(A) FONT
(B) COLOR
(C) TYPE
(D) SIZE
Ans: C
44. RGB value for Red is
(A) FFOOFF
(B) FFFFFF
(C) FFOOOO
(D) FFFFOO
Ans: C
45. RGB value for Green is
(A) FFOOFF
(B) 00FF00
(C) FFOOOO
(D) FFFFOO
Ans: B
46. A collection of images that are part of MS office is called a ___
(A) Web
(B) FrontPage Express
(C) Clipart
(D) Toolbar
Ans: C
47. Software applications used for creating web pages and web
sites are called as ___
(A) Web programs
(B) Web page editors
(C) Web master
(D) Web links
Ans: B
48. Which attribute is used to specify the colour to be used for
links?
(A) BGCOLOR
(B) Link
(C) VLINK
(D) TEXT
Ans: B
49. <HTML> is followed by how many sections?
(A) 2
(B) 3
(C) 4
(D) 6
Ans: A
50. _____ attribute can be added to make one of the options as
the default option.
(A) SIZE
(B) CHECKED
(C) TYPE
(D) VALUE
Ans: B
51. Which of the following properties will we use to display border around a
cell without any content ? (A ) empty-cell
(B ) blank-cell
(C ) noncontent-cell
(D ) void-cell
Ans: A
52. XML is designed to store data and .------
(A ) Design
(B ) Verify
(C) Transport
(C) Both A&B Ans: C
53. Which of the following XML fragments are well-formed?
(A ) <myElement myAttribute = “some Value/”>
(B ) <myElement myAttribute = some Value/>
(C) <myElement myAttribute = ‘some Value/’>
(C) <myElement myAttribute = “some Value/’>
Ans: A
54. Which language is Extensible Markup Language (XML) similar?
(A ) HTML
(B ) PHP
(C ) JavaScript
(D ) Wordpress
Ans: A
55. The use of a DTD in XML development is:
(A ) required when validating XML documents
(B ) no longer necessary after the XML editor has been customized
(C ) used to direct conversion using an XSLT processor
(D ) a good guide to populating a templates to be filled in when generating
an XML document automatically
Ans: A
56. The default model for complex type, in XML schemas for element is
(A ) textOnly
(B ) elementOnly
( C ) no default type
(D ) both 1 & 2
Ans: B
57. The property specifies if/how an element is displayed.
(A ) background-color
( B ) border
(C ) color
(D ) display
Ans: D
58. The property specifies the background color of an element.
( A ) background-color
(B ) border
(C ) color
(D ) display
Ans: A
59. How to include HTML content into another HTML
(A ) Server Side push
(B ) Use of CommetD
(C ) Use of Polling
(D ) Use of include
Ans: D
60. If we want define style for an unique element, then which css selector
will we use ? (A ) Id
(B ) text
(C ) class
(D) name
Ans: A
61. In XML document comments are given as?
(A ) < !---- !>
(B ) < !-- ?
(C ) < /---->
(D ) < ?-- ?
62. 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
Ans: A
63. Which are the main features of XML?
(A ) Text data description
(B ) Human- and computer-friendly format
( C ) Handles data in a tree structure having one-and only one-root element
(D ) All mentioned above
Ans: D
64. Which Characters are illegal in XML elements?
(A ) " < "
(B ) "&"
(C ) Both A & B
(D ) None of the above
Ans: C
65. Which is not a XML function?
( A ) Transport information
(B ) Style information
(C ) Store information
(D ) Structure information
Ans: B
66. Find the correct syntax of the declaration which defines the XML
Version?
(A ) < ?xml version= "1.0" ? >
(B) < xml version="1.0"/ >
( C ) < ?xml version="1.0" / >
(D ) None of the above
Ans: A
67. Which CSS property is used to control the text size of an element ?
(A ) font-style
( B ) text-size
(C ) font-size
( D ) text-style Ans: C
68. . In XML document comments are given as?
( A ) < !---- !>
( B ) < !-- ?
(C ) < /---->
(D ) < ?-- ?
Ans: B
69. Disadvantages of DTD are
(i)DTDs are not extensible
(ii) DTDs are not in to support for namespaces
(iii) there is no provision for inheritance from one DTDs to another
(A ) (i) is correct
(B ) (i),(ii) are correct
(C ) (ii),(iii) are correct
( D ) (i),(ii),(iii) are correct
Ans: D
70. Which method is used to set or reset CSS property in Jquery
(A ) selector.CSS() B : $(selector).css()
(C ) $(selector).style() D : None of above
Ans: B
UNIT 2
71. JavaScript statements embedded in an HTML page can respond to
user events such as mouse-clicks, form input, and page navigation.
(A) Client-side
(B) Server-side
(C) Local
(D) Native Ans: A
72. Which method is used to create new HTML element in JS
(A) document.createElement()
(B) document.createNewElement()
(C) newElement()
(D) document.HTMLElement()
Ans: A
73. How to assign the image source in JavaScript?
(A) image = “url”
(B) source(“url”)
(C) image.src = “url”
(D) img.src=”url”
Ans: C
74. Correct way of accessing javascript object var person =
{firstName:"John", lastName:"Doe"}
(A) person.lastName;
(B) person#lastName
(C) lastName
(D) None of above
Ans: A
75. . If para1 is the DOM object for a paragraph, what is the correct syntax
to change the text within the paragraph?
(A) "New Text"?
(B) para1.value="New Text";
(C) para1.firstChild.nodeValue= "New Text";
(D )para1.nodeValue="New Text";
Ans: B
76. How does JavaScript store dates in a date object?
(A) the number of milliseconds since January 1st, 1970
(B) The number of days since January 1st, 1900
(C) The number of seconds since Netscape's public stock offering.
(D) None of the above
Ans: A
77. Which is currect one to hide id element using jquery
( A) $(".test").hide()
(B) $("#test").hide()
(C) Both of above
(D) None of above
Ans: B
78. Which of the following best describes JavaScript?
(A) a low-level programming language.
(B) a scripting language precompiled in the browser.
(C) a compiled scripting language.
(D) an object-oriented scripting language.
Ans: D
79. What does validate() method of ActionForm returns?
(A) ActionErrors
(B) ActionForward
(C) ActionMapping
(D) ActionError
Ans: B
80. Statement in JavaScript ends with
(A) comma
(B) Semicolon
(C) Question mark
(D) Dollar sign
Ans: B
81. How many types of selectors available in jquery.
(A) 1
(B) 2
(C) 3
(D) 4
Ans: C
82. JavaScript is also called server-side JavaScript
(A) Microsoft
(B) Navigator
(C) LiveWire
(D) Native
Ans: C
83. Which of the following is correct?
(A) jQuery is a JavaScript Library
(B) jQuery is a JSON Library
(C) Both of These
(D) None
Ans: A
84. Which of the following is a server side technology?
(A) Html
(B) JSP
(C) JavaScript
(D) CSS
Ans: B
85. Which of the following is a client side technology?
(A) Html
(B) CSS
(C) JavaScript
(D) All of above
Ans: D
86. What is divide by 0 in Javascript?
var a = 10;
var b = 0;
document.write(a/b);
(A) Nothing is printed
(B) 0 is printed
(C) Infinity is printed
(D) Some Garbage Value
Ans: C
87. Which method is used to create new HTML element in JS
(A) document.createElement()
(B) document.createNewElement()
(C) newElement()
(D) document.HTMLElement()
Ans: A
88. Which is a currect Jquery Syntax to hide all paragraph elements
(A) ("p").hide()
(B) $("p").hide()
(C) $hide("p")
(D) p.hide()
Ans: B
89. Correct way of accessing javascript object var person =
{firstName:"John", lastName:"Doe"}
(A) person.lastName;
(B) person#lastName
(C) lastName
(D) None of above
Ans: A
90. A similar rule called the ----------is specified using the plus sign (+) and
is used to select elements that would be siblings of each other.
(A) class selectors
(B) attribute selectors
(C) adjacent-sibling selector
(D) none of the mentioned
Ans:C
91. Correct way to declare object in JS
(A) var x = {firstName:"John", lastName:"Doe"};
(B) x = obj(firstName:"John", lastName:"Doe")
(C) Both of above
(D) None of above
Ans: A
92. Which of the following type of variables have only two possible values
either true or false?
(A) Integers
(B) Doubles
(C) booleans
(D) Strings
Ans: C
93. What is the correct syntax for referring to an external script called "
abc.js"?
(A )<script href = “abc.js”>
(B)<script name= “abc.js”>
(C)<script src = “abc.js”>
(D )NONE
94. What will function return
function sum ()
{
var s = 0;
for (var i = 0; i < arguments.length; i++)
s += arguments[i];
return s; }
sum(1, 2, 3,4,5);
(A) 2
(B) 5
(C) 15
(D) NONE
Ans: C
94. Which of the following is the Web application equivalent to
querySelectorAll()?
(A) #()
(B) &()
(C) $()
(D) None of the mentioned
Ans: C
95. What should appear at the very end of your JavaScript? The
<script LANGUAGE="JavaScript">tag.
(A) The </script>
(B) The <script>
(C) The END statement
(D) None of the above
Ans: A
96. Find output of below code:
var a = '10';
var b = a = 20;
document.write(a+b);
(A) Error in Script
(B) 10'20
(C) 1020
(D) 40
Ans: D
97. Find output of below Javascript code
<script>
document.write(2+2 + " = 2 plus 2");
</script>
(A) 2+2+ = 2 plus 2
(B) 4 + = 2 plus 2
(C) 4 = 2 plus 2
(D) Syntax Error
Ans: C
98. Which of the following type of variable is visible everywhere in
your JavaScript code?
(A) global variable
(B) local variable
(C) Both of the above
(D) None of the above
Ans: A
99. Which of the following best describes JavaScript?
(A) a low-level programming language.
(B) a scripting language precompiled in the browser.
(C) a compiled scripting language.
(D) an object-oriented scripting language.
Ans: D
100. Why so JavaScript and Java have similar name?
(A) JavaScript is a stripped-down version of Java
(B) JavaScript's syntax is loosely based on Java's
(C) They both originated on the island of Java
(D) None of the above
Ans: B
101. Which Method is used to find element using class name
(A) findElementByClassName()
(B) getElementByClassName()
(C) className()
(D) getClass()
Ans: B
102. How is everything treated in HTML DOM?
(A) Node
(B) Attributes
(C) Elements
(D) Arrays
Ans: A
103. Correct method to sort elements from array a in javascript is
(A) a.sort()
(B) sort(a)
(C) a = sort()
(D) None of above
Ans: A
104. What is the correct JavaScript syntax to write "Hello World"?
(A) System.out.println("Hello World")
(B) println ("Hello World")
(C) document.write("Hello World")
(D) response.write("Hello World")
Ans: C
105. What is the correct way to open the file "time.txt" as readable?
(A) fopen("time.txt","r");
(B) open("time.txt","read");
(C) fopen("time.txt","r+");
(D) open("time.txt");
Ans: A
106. Which is currect one to hide class element using jquery
(A) $(".test").hide()
(B) $("#test").hide()
(C) Both of above
(D) None of above Ans: A
107. What are the advantages of DOM Parsing?
(A) The DOM is a common interface for manipulating document structures
(B) One of its design goals is that Java code written for one DOM-compliant
parser should run on any other DOM-compliant parser without changes
(C) Both of the above
(D) None of the above
Ans: C
108. jQuery code to set the background color of all span elements to
blue?
(A) $("span").style("background-color","blue");
(B) $("span").manipulate("background-color","blue");
(C) $("span").css("background-color","blue");
(D) $("span").layout("background-color","blue");
Ans: C
109. What is the correct way to add 1 to the $count variable?
(A) $count++;
(B) ++count
(C) $count =+1
(D) count++;
Ans: A
110. What is the difference between echo and print?
(A) They both behave the same.
(B) Print can take multiple parameters where as echo can not
(C) Echo can take multiple parameters where as print can not
(D) Print is a function where as echo is not.
Ans: C
111. To add the attribute named Type to the <customer> tag the
syntax will be
(A) <customer attribute Type=”exelent”>
(B) <customer Type attribute =”exelent”>
(C) <customer Type attribute_type=”exelent”>
(D) <customer Type=” exelent” >
Ans: D
112. Which types of image maps can be used with JavaScript?
(A) Server-side image maps
(B) Client-side image maps
(C) Server-side image maps and Client-side image maps
(D) None of the above
Ans: B
113. Which of the following event fires when the form element loses
the focus: <button>,
<input>, <label>, <select>, <textarea>?
(A) onfocus
(B) onblur
(C) onclick
(D) ondblclick
Ans: D
114. What is the output of following Javascript?
var a = 'cpp';
var b = 'buzz';
var c = a/b;
document.write(c);
(A) cppbuzz
(B) cpp/buzz
(C) NaN
(D) None of the above
Ans: C
115. Correct way to declare object in JS
(A) var x = {firstName:"John", lastName:"Doe"};
(B) x = obj(firstName:"John", lastName:"Doe")
(C) Both of above
(D) None of above
Ans: A
144. Which one of the following method is used to retrieve the number
of rows affected by an INSERT, UPDATE, or DELETE query?
(A) num_rows()
(B) affected_rows()
(C) changed_rows()
(D) new_rows()
Ans: B
149. We can add new element at the end of existing element using
A : append
B : new
C : addLast
D : None of above
Ans: A