0% found this document useful (0 votes)
276 views114 pages

HTML Basics Quiz for BCA Students

Uploaded by

chhipahemesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
276 views114 pages

HTML Basics Quiz for BCA Students

Uploaded by

chhipahemesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

SOBHASARIA COLLEGE,SIKAR

Name-Aryan jangir

Father’s Name-Rakesh JANGIR

ROLL No:

Std.-BCA 1st year / 1st Sem(Session-2023-24)

Sec-A3

Sub-Web Application Developement

1. What is HTML?
a) HTML describes the structure of a webpage
b) HTML is the standard markup language mainly used to create web pages
c) HTML consists of a set of elements that helps the browser how to view the content
d) All of the mentioned
Answer:- d

2. Who is the father of HTML?


a) Rasmus Lerdorf
b) Tim Berners-Lee
c) Brendan Eich
d) Sergey brin
Answer:- b
3. HTML stands for __________
a) Hyper Text Markup Language
b) Hyper Text Machine Language
c) Hyper Text Marking Language
d) High Text Marking Language
Answer:- a
4. What is the correct syntax of doctype in HTML5?
a) </doctype html>
b) <doctype html>
c) <doctype html!>
d) <!doctype html>
Answer:- d
5. Which of the following is used to read an HTML page and render it?
a) Web server
b) Web network
c) Web browser
d) Web matrix
Answer:- c
6. Which of the following is not a difference between HTML and XHTML?
a) Charset in both html and xhtml is “text/html”
b) Tags and attributes are case-insensitive in HTML but not in XHTML
c) Special characters must be escaped using character entities in XHTML unlike HTML
d) Charset in html is “text/html” where as in xhtml it is “application/xml+xhtml”
Answer:- a
7. Which of the following tag is used for inserting the largest heading in HTML?
a) head
b) <h1>
c) <h6>
d) heading
Answer:- b
8. What is DOM in HTML?
a) Language dependent application programming
b) Hierarchy of objects in ASP.NET
c) Application programming interface
d) Convention for representing and interacting with objects in html documents
Answer:- d
9. In which part of the HTML metadata is contained?
a) head tag
b) title tag
c) html tag
d) body tag
Answer:- a
10. Which element is used to get highlighted text in HTML5?
a) <u>
b) <mark>
c) <highlight>
d) <b>
Answer:- b
11. Which of the following is not a HTML5 tag?
a) <track>
b) <video>
c) <slider>
d) <source>
Answer:- c
12. How do we write comments in HTML?
a) </…….>
b) <!……>
c) </……/>
d) <…….!>
Answer:- b
13. Which of the following elements in HTML5 defines video or movie content?
a) <video>
b) <movie>
c) <audio>
d) <media>
Answer:- a
14. Which of the following is not the element associated with the HTML table layout?
a) alignment
b) color
c) size
d) spanning
Answer:- b
15. Which element is used for or styling HTML5 layout?
a) CSS
b) jQuery
c) JavaScript
d) PHP
Answer:- a
16. Which HTML tag is used for making character appearance bold?
a) <u>content</u>
b) <b>content</b>
c) <br>content</br>
d) <i>content</i>
Answer:- b
17. Which HTML tag is used to insert an image?
a) <img url=”htmllogo.jpg” />
b) <img alt=”htmllogo.jpg” />
c) <img src=”htmllogo.jpg” />
d) <img link=”htmllogo.jpg” />
Answer:- c
18. HTML is a subset of ___________
a) SGMT
b) SGML
c) SGME
d) XHTML
Answer:- b
19. Which character is used to represent when a tag is closed in HTML?
a) #
b) !
c) /
d) \
Answer:- c
20. Which of the following HTML code will make an image clickable?
a)

<a href="https://www.sanfoundry.com/">Sanfoundry Home Page</a>

b)

<img src="https://www.sanfoundry.com/sanfoundry-logo">
<a href="https://www.sanfoundry.com/">Sanfoundry Home Page</a>
</img>

c)

<a href="https://www.sanfoundry.com/">Sanfoundry Home Page</a>


<img src="https://www.sanfoundry.com/sanfoundry-logo" />

d)

<a href="https://www.sanfoundry.com/"><img
src="https://www.sanfoundry.com/sanfoundry-logo" /></a>

Answer:- d

21. Among the following, which is the HTML paragraph tag?


a) <p>
b) <pre>
c) <hr>
d) <a>
Answer:- a
22. In HTML, which attribute is used to create a link that opens in a new window tab?
a) src=”_blank”
b) alt=”_blank”
c) target=”_self”
d) target=”_blank”
Answer:- d
23. Which HTML element is used for short quote?
a) <em>
b) <abbr>
c) <q>
d) <blockquote>
Answer:- c
24. Which of the following HTML tag is used to create an unordered list?
a) <ol>
b) <ul>
c) <li>
d) <ll>
Answer:- b
25. Which HTML element is used for abbreviation or acronym?
a) <abbr>
b) <blockquote>
c) <q>
d) <em>
Answer:- a
26. Which of the following HTML tag is used to add a row in a table?
a) <th>
b) <td>
c) <tr>
d) <tt>
Answer:- c
27. What is the work of <address> element in HTML5?
a) contains IP address
b) contains home address
c) contains url
d) contains contact details for author
Answer:- d
28. Which of the following tag is used to create a text area in HTML Form?
a) <textarea> </textarea>
b) <text></text>
c) <input type=”text” />
d) <input type=”textarea” />
Answer:- a
29. To show deleted text, which HTML element is used?
a) <del>
b) <em>
c) <strong>
d) <ins>
Answer:- a
30. What is the correct syntax of web address?
a) port://domain.filenmae:path/scheme/prefix
b) prefix://scheme.port:domain/filename/path
c) path://prefix.port:domain/filename/scheme
d) scheme://prefix.domain:port/path/filename
Answer:- d
31. Which tag is used to create a dropdown in HTML Form?
a) <input>
b) <select>
c) <text>
d) <textarea>
Answer:- b
32. Which tag is used to create a numbered list in HTML?
a) <ol>
b) <ul>
c) <li>
d) <ll>
Answer:- a
33. How to create a checkbox in HTML Form?
a) <input type=”text”>
b) <input type=”textarea”>
c) <input type=”checkbox”>
d) <input type=”button”>
Answer:- c
34. How to insert Hyperlink in HTML Page?
a)

<a href="https://www.sanfoundry.com/1000-html-questions-answers/">HTML
MCQ</a>

b)

<a target="https://www.sanfoundry.com/1000-html-questions-answers/" HTML


Quiz />

c)

<a src="https://www.sanfoundry.com/1000-html-questions-answers/">HTML
Test</a>

d)

<a>https://www.sanfoundry.com/1000-html-questions-answers/</a>

Answer:- a

35. Which of the following extension is used to save an HTML file?


a) .hl
b) .h
c) .htl
d) .html
Answer:- d
36. Which tag is used to create a blank line in HTML?
a) <b>
b) <br>
c) <em>
d) <a>
Answer:- b
37. Which HTML tag is used to convert the plain text into italic format?
a) <b>
b) <p>
c) <i>
d) <a>
Answer:- c
38. What is the use of <hr/> tag in HTML?
a) For making content appearance italics
b) To create vertical rule between sections
c) To create a line break
d) To create horizontal rule between sections
Answer:- d
39. Which attribute is not essential under <iframe>?
a) frameborder
b) width
c) height
d) src
Answer:- a
40. Which works similar to <b> element?
a) <blockquote>
b) <strong>
c) <em>
d) <i>
Answer:- b
41. Which tag is used to underline the text in HTML?
a) <p>
b) <u>
c) <i>
d) <ul>
Answer:- b
42. Which attribute specifies a unique alphanumeric identifier to be associated with an
element?
a) type
b) article
c) id
d) class
Answer:- c
43. Which of the following is an HTML specification used to add more information to
HTML tags?
a) Modifydata
b) Minidata
c) Macrodata
d) Microdata
Answer:- d
44. Which HTML element is used for YouTube videos?
a) <samp>
b) <small>
c) <frame>
d) <iframe>
Answer:- d
45. Which of the following HTML element is used for canvas graphics?
a) <css>
b) <paint>
c) <canvas>
d) <graphic>
Answer:- c
46. How many standard color names does HTML supports?
a) 120
b) 130
c) 140
d) 90
Answer:- c
47. Which of the following is not set with font-style property?
a) font-style: normal
b) font-style: italic
c) font-style: oblique
d) font-style: capitalize
Answer:- d
48. What should be set with text-align property so that every line has equal width like in
magazines and newspapers?
a) text-align: justify
b) text-align: none
c) text-align: bottom
d) text-align: top
Answer:- a
49. Which of the following is not used with text-decoration property?
a) overline
b) underline
c) line-through
d) inline
Answer:- d
50. Which works similar to <i> element?
a) <strong>
b) <em>
c) <b>
d) <blockquote>
Answer:- b
51. Which works similar to <b> element?
a) <strong>
b) <em>
c) <i>
d) <blockquote>
Answer:- a
52. Which element is used for short quote?
a) <q>
b) <blockquote>
c) <em>
d) <abbr>
Answer:- a
53. Which element is used for abbreviation or acronym?
a) <em>
b) <q>
c) <abbr>
d) <blockquote>
Answer:- c
54. What is the work of <address> element?
a) contains contact details for author
b) contains IP address
c) contains home address
d) contains url
Answer:- a
55. To show deleted text, which element is used?
a) <ins>
b) <del>
c) <em>
d) <strong>
Answer:- b
56. Which element is used to show inserted element?
a) <ins>
b) <del>
c) <strong>
d) <em>
Answer:- a
57. How <bdo> element works?
a) override text direction
b) stops writing in the current text direction
c) only override direction of rtl text
d) only changes the direction of ltr text
Answer:- a
58. Which property is similar to C/C++ can be applied to comments?
a) for loop
b) while loop
c) ifelse
d) switch case
Answer:- c
59. Which element defines a title of the Work?
a) <abbr>
b) <cite>
c) <address>
d) <blockquote>
Answer:- b
60. For smaller text which element is used?
a) <tiny>
b) <min>
c) <small>
d) <em>
Answer:- c
61. A Rendering engine is not responsible for ________
a) parsing the markup content (HTML)
b) parsing style information (CSS, XSL, and so on)
c) generating a visual presentation of the formatted content including media files
referenced
d) parsing style information (CSS only)
Answer:- d
62. Firefox uses _________ rendering engine.
a) WebKit
b) Gecko
c) Trident
d) Presto
Answer:- b
63. State true or false. It is faster to render HTML and CSS than to interpret and execute
JavaScript.
a) True
b) False
Answer:- a
64. What is the use of “defer” attribute?
a) It defers rendering of html page
b) It defers script execution until the page has been rendered
c) It defers rendering of css attributes
d) It is only for internal scripts
Answer:- b
65. Which of the following statements is false?
a) async and defer attributes of script tag execute before the DOMContentLoaded event
b) defer executes each script sequentially
c) async executes each script when it is ready
d) all older browsers supports async attribute
Answer:- d
66. Which of the following is used to read a HTML page and render it?
a) Web browser
b) Web server
c) Web matrix
d) Web network
Answer:- a
67. Which of the following is the first web browser?
a) Nexus
b) Netscape Navigator
c) Internet Explorer
d) Mosaic
Answer:- a
68. Who created the first web browser
a) Tim Berners Lee
b) Jacobs, Lan
c) Marc Andeersen
d) Mozilla foundation
Answer:- a
69. Nexus is first graphical web browser.
a) True
b) False
Answer:- b
70. The open source software version of netscape is _________
a) Chrome
b) Mozilla
c) Internet Explorer
d) Erwise
Answer:- b
71. For explaining, which new technology is used?
a) <dfn>
b) <cite>
c) <abbr>
d) <address>
Answer:- a
72. Which element indicates about something which is no longer accurate?
a) <s>
b) <ins>
c) <del>
d) <address>
Answer:- a
73. Metadata does not define _________
a) character set
b) links
c) scripts
d) color
Answer:- d
74. In HTML5 which element defines thematic change in the content?
a) <hr>
b) <h1>
c) <head>
d) <p>
Answer:- a
75. Which element defines preformatted text?
a) <p>
b) <pre>
c) <hr>
d) <ins>
Answer:- b
76. Which element is used for creating links?
a) <a>
b) <p>
c) <li>
d) <ol>
Answer:- a
77. Relative URLs are used to ____________
a) link other pages within the same site
b) link the same page with other sites
c) link other pages with other sites
d) does not link
Answer:- a
78. What is the color of an unvisited link?
a) red
b) blue
c) purple
d) green
Answer:- b
79. Which one of the following is not the value of the target attribute?
a) _blank
b) _top
c) _self
d) _empty
Answer:- d
80. What is the path for an image located in same folder as the current page?

a) <img src= “pic.jpg”>


b) <img src= “../pic.jpg”>
c) <img src= “images/pic.jpg”>
d) <img src= “/images/pic.jpg”>

Answer:- a

81. File paths are not used for linking in _________


a) JavaScripts
b) PHP
c) Style Sheets
d) Images
Answer:- b
82. For defining bookmarks in a page we use __________
a) href
b) id
c) target
d) <a>
Answer:- b
83. Which tag is used for List items?
a) <li>
b) <ol>
c) <ul>
d) <dl>
Answer:- a
84. Which element contains definition?
a) <dl>
b) <dd>
c) <dt>
d) <ul>
Answer:- b
85. Which of the following can’t be the value of list-style-type?
a) square
b) circle
c) ellipse
d) disc
Answer:- c
86. For displaying a list horizontally, we can use ______________
a) <dd>
b) display:inline
c) <dt>
d) type
Answer:- b
87. Which attribute is only used with <ol>?
a) value
b) type
c) compact
d) start
Answer:- d
88. Which element is restricted to inline content?
a) <dt>
b) <dd>
c) <ul>
d) <dl>
Answer:- a
89. Which element was designed for creating multicolumn directory lists?
a) menu
b) dir
c) ul
d) ol
Answer:- b
90. The content property does not include __________
a) Strings
b) URIs
c) Normal
d) Color
Answer:- d
91. Which character is used to differentiating between choices to list items?
a) ‘|’
b) ‘>’
c) ‘#’
d) ‘$’
Answer:- a
92. Which of the following is not true regarding to counter?
a) counter(name,style)
b) counter(name)
c) counter(string)
d) counter(name,string,style)
Answer:- c
93. Which property specifies the distance between nearest border edges of marker box
and prinicipal box?
a) marker-offset
b) counter increment
c) list-style
d) list-style-image
Answer:- a
94. target attribute cannot have?
a) _blank
b) _self
c) _parent
d) _color
Answer:- d
95. Which of the following opens linked document in full body?
a) _blank
b) _top
c) _parent
d) framename
Answer:- b
96. Which attribute is used to link the bookmark?
a) href
b) id
c) target
d) <img>
Answer:- a
97. Which of the following sets the color of a link before it has been clicked on?
a) ALINK
b) LINK
c) VLINK
d) ULINK
Answer:- b
98. What is used for specifying an email to be sent?
a) mailto:
b) target
c) id
d) href
Answer:- a
99. Which of the following is not the parameter for email link?
a) body
b) bcc
c) cc
d) #
Answer:- d
100. Which one of the following is used for space character?
a) %50
b) %60
c) %20
d) %10
Answer:- c
101. What will add line break in the body of mail?
a) %20
b) %0D%0A
c) %0h%0A
d) %10
Answer:- b
102. Each cell of the table can be represented by using __________
a) <tr>
b) <td>
c) <th>
d) <thead>
Answer:- b
103. For heading we can use ____________
a) <td>
b) <tr>
c) <thead>
d) <th>
Answer:- d
104. Headings of table lies inside ___________
a) <thead>
b) <tfoot>
c) <th>
d) <tbody>
Answer:-a
105. Which of the following is not the element associated with HTML table layout?
a) size
b) spanning
c) alignment
d) color
Answer:-d
106. Which of the following element is not associated with a class attribute?
a) Row
b) <thead>
c) Column cell
d) Rows
Answer:-b
107. For adding caption to the table we use ____________
a) <caption>
b) <thead>
c) <th>
d) <tr>
Answer:- a
108. border-spacing is given in _____________
a) pixels
b) cm
c) mm
d) inch
Answer:- a
109. Borders can’t be applied on ________________
a) <th>
b) <td>
c) <tr>
d) <thead>
Answer:- c
110. Which attribute defines numbers of columns in a group?
a) width=multi-length[CN].
b) span=number[CN].
c) scope=scope-name[CN].
d) headers=idrefs[CS].
Answer:- b
111. Which of the following does not specify a column width?
a) Fixed
b) Percentage
c) Proportional
d) Pixels
Answer:- d
112. Scope attribute can’t have the value __________
a) row
b) rowgroup
c) col
d) <head>
Answer:- d
113. Which of the following is not the value for frame attribute?
a) above
b) void
c) none
d) box
Answer:- c
114. Which of the following is not the value for rules attribute?
a) vsides
b) rows
c) all
d) groups
Answer:- a
115. Which of the following is not the value for align attribute?
a) justify
b) char
c) middle
d) left
Answer:- c
116. valign attribute does not take the value __________________
a) justify
b) middle
c) baseline
d) bottom
Answer:- a
117. Sprites are _____________
a) 1-D images
b) 2-D images
c) 3-D images
d) not the image
Answer:- b
118. Sprites are not used for _________
a) beautify the web page
b) reducing HTTP request
c) reduce loading time
d) reducing multiple server requests
Answer:- a
119. Each image in sprite should be approximately of ___________
a) 100 pixels
b) 20 pixels
c) 10 pixels
d) 50 pixels
Answer:- c
120. Which of the following is not Sprite Sheet generator?
a) Lemonade
b) Firewoks CS6
c) SpriteMe
d) Pixelomator
Answer:- d
121. Which is the best platform for working with the individual image?
a) SpriteMe
b) Fireworks CS6
c) Lemonade
d) Compass
Answer:- a
122. Which of the following does not generate a sprite sheet?
a) SpriteRight
b) Sprite Cow
c) CSS Sprites
d) Glue
Answer:- b
123. Templates can’t be placed inside ______________
a) <head>
b) <body>
c) <table>
d) <form>
Answer:- d
124. The .content property is __________
a) read-only
b) write-only
c) read-write
d) hidden
Answer:- a
125. <template> does not include the attribute ___________
a) id
b) hidden
c) lang
d) src
Answer:- d
126. Which browser does not support <template> element?
a) Chrome
b) Firefox
c) Internet Explorer
d) Opera
Answer:- c
127. Which of the following is not DOM property?
a) element.appendChild(node)
b) document.createElement()
c) element.innerHTML
d) document.getElementById()
Answer:- d
128. Which of the following is not a template library?
a) Mustache
b) Underscore JS library
c) Live.js
d) Handlebars
Answer:- c
129. Which process is used for the creation of the end result?
a) render()
b) compile()
c) eval(x)
d) encodeURI()
Answer:- a
130. Which of the following prints bold letters in traditional HTML?

i. <B>Go boldly</B>
ii. <B>Go boldly</b>
iii. <b>Go boldly</B>
iv. <b>Go boldly</b>
a) iv
b) i
c) i, ii, iii, and iv
d) both iv and i
Answer:- c
131. XHTML is case insensitive and HTML is case sensitive.
a) True
b) False
Answer:- b
132. What output do you expect if the following markup is rendered?

<strong>T e s t o f s p a c e s</strong><br>
<strong>T e s t &nbsp;o f&nbsp; s p a c e s </strong><br>
a) T e s t o f s p a c e s
Testofspaces
b) Testofspaces
Testofspaces
c) T e s t o f s p a c e s
Test of spaces
d) T e s t o f s p a c e s
Testofspaces
Answer:- c
133. Which of the following options follows content model in HTML?

i.<ul>
<p>Option one </p>
</ul>
ii.<ul>
<li>Option two </li>
</ul>
a) i
b) ii
c) i and ii
d) Neither i nor ii
Answer:- b
134. Which of the following is not an empty element?

a) <hr/>
b) <br/>
c) <p/>
d) Both <hr/> and <br/>
Answer:- c
135. State true or false.
<p></p><p></p><p></p>produces numerous blank lines.
a) True
b) False
Answer:- b
136. Which of the following markup is correct?

i. <b><i>is in error as tags cross</b></i>


ii. <b><i>is not since tags nest</i></b>
a) i
b) ii
c) i and ii
d) Neither i nor ii
Answer:- b
137. Which of the following is not a correct (X)HTML rule?
a) Attributes should be quoted
b) Tags should not nest tag
c) Attribute minimization is forbidden
d) Unknown attributes are not ignored by the browser
Answer:- d
138. Choose the incorrect escape character entity.

a) &gt;
b) &#62;
c) &lt;
d) &st;
Answer:-d

140. Identify the count of mistakes in the following markup.

<html>
<head>
</head>
<body>
<li>
<ul><p>Hello</p></ul>
</li>
<br>
<hr>
</body>
</html>
a) 2
b) 3
c) 1
d) 0
Answer:- b
141. What is the maximum cache size for Chrome?
a) unlimited
b) 300 MB
c) 400 MB
d) 1024 MB
Answer:-b
142. Which of the following is not possible compression value?
a) identity
b) deflate
c) compress
d) DNS
Answer:- d
143. Gzip is not fully supported by ___________
a) Netscape 4.60+
b) Firefox
c) Netscape 6+
d) IE 4+
Answer:-a
144. What is the size of PHP Module extension mysql.so?
a) 35 KB
b) 42 KB
c) 15 KB
d) 107 KB
Answer:- b
145. Which of the following locking method does not supported by APC?
a) File locks
b) Spin locks
c) Dead locks
d) IPC semaphores
Answer:- c
146. Which of the following is not the class of NoSQL?
a) Document stores
b) Multidimension stores
c) Key-value stores
d) Memcache
Answer:- d
147. Which of the following is not a kind of MySQL backup?
a) File backups
b) CSV backups
c) SQL backups
d) Table backups
Answer:- d
148. Which of the following is the final method to create MySQL backups?
a) LVM snapshots
b) SQL backups
c) CSV backups
d) File backups
Answer:- a
149. Which of the following is not MySQL Forks?
a) MariaDB
b) OurDelta
c) Drizzle
d) Sphinx
Answer:- d
150. Which command controls the maximum number of tables that the cache can hold?
a) table_open_cache
b) table_definition_cache
c) open_files_limit
d) read_buffer_size
Answer:- a
151. For sequential scans of tables we use ____________
a) read_buffer_size
b) join_buffer_size
c) read_rnd_buffer_size
d) sort_buffer_size
Answer:- a
152. How many MPMs can be loaded at a time?
a) 3
b) 1
c) 4
d) 0
Answer:- b
153. Which version of web worker is introduced in Internet Explorer?
a) Version 3.5
b) Version 10.6
c) Version 10.0
d) Version 4.0
Answer:- c
154. Which of the following defines a part of text that might be formatted in a different
direction from other text?

a) <details>
b) <aside>
c) <bdi>
d) <article>
Answer:- c

155. Which of the following defines a caption for a figure element?


a) <figcaption>
b) <dialog>
c) <caption>
d) <figure>
Answer:- a

156. Which of the following defines a command/menu item that the user can invoke from
a popup menu?
a) <menuitem>
b) <menu>
c) <nav>
d) <class>
Answer:- a

157. Which of the following tag defines the progress of a task?


a) <meter>
b) <progress>
c) <gauge>
d) <wbr>
Answer:- b

158. Which of the following defines the result of a calculation?


a) <output>
b) <keygen>
c) <datalist>
d) <datalist>
Answer:- a

159. Which of the following defines graphic drawing using JavaScript?


a) <class>
b) <canvas>
c) <graphics>
d) <draw>
Answer:- b

160. Which of the following elements in HTML5 defines video or movie content?
a) <media>
b) <video>
c) <movie>
d) <audio>
Answer:- b

161. Which of the following defines some content aside from the content it is placed in
(like a sidebar)?
a) <aside>
b) <header>
c) <sidebar>
d) <nav>
Answer:- a

162. Which of the following defines a visible heading for a details element?
a) <brief>
b) <summary>
c) <mark>
d) <main>
Answer:- b

163. Which of the following defines additional details that the user can view or hide?
a) <details>
b) <article>
c) <aside>
d) <figure>
Answer:-a

164. Which of the following is not an IDE?


a) BlueGriffon 1.5.2
b) Aptana studio 3
c) TextEdit(Mac)
d) Dreamweaver
Answer:-c
165. IDE stands for _________
a) Internet Development Environment
b) Integrated Development Environment
c) Intelligent Development Environment
d) Integrated Developed Environment
Answer:-b
166. We can define ________ number of sites with one copy of dreamweaver installed
on our computer.
a) 990
b) 10
c) only 1
d) unlimited
Answer:-d
167. What should we add to a template in Dreamweaver in order to control where page
content goes?
a) Editable Regions
b) HTML controllers
c) Frames
d) Content Controllers
Answer:-a
168. Blue Griffon is based on ________ rendering engine.
a) WebKit
b) Gecko
c) Presto
d) Mecko
Answer:-b
169. Swapping images in dreamweaver is best if __________
a) The images are the same “Mime” type
b) The images are the same color
c) The images are the same size
d) You use the “Constrain” tool
Answer:-c
170. Choose the inappropriate option with respect to Blue Griffon 1.5.2. Blue Griffon
_________
a) includes tools for developing HTML5 pages
b) abstracts out many css3 effects
c) supports direct embedding of audio and video files
d) supports swapping of videos of any length
Answer:-d
171. Maqetta is an open source initiative of the Dojo Foundation to geared towards
visual designers through a WYSIWYG user interface.
a) True
b) False
Answer:-a
172. Choose the correct statement.
a) Exo is a cloud-based ide that offers collaboration and developed features
b) Exo does not support java and python
c) Exo does not support javascript and html5
d) Exo is a cloud-based ide that offers collaboration and deployment features & its
supports javascript and html5
Answer:-d
173. Which of following statement is true?
i. Cloud9 has gained particular interest for its integration with GitHub and Bit Bucket
authentication integration and real-time collaboration.
ii. Cloud9 does not account for SSH and FTP access.
a) ii
b) i
c) i and ii
d) Neither i and ii
Answer:-b
174. Which of the following is not a web server?
a) Apache tomcat
b) BlueGriffon
c) Jetty
d) Tornado
Answer:- b
175. Tomcat is an open source web server that provides a servlet container allowing you
to run Java code.
a) True
b) False
Answer:-a
176. Which of the following interface is not supported by LightTPD?
a) FastCGI
b) SCGI
c) GCGI
d) CGI
Answer:-c
177. Which of the following is not a prepackaged server stack?
a) WAMP
b) XAAMP
c) MAMP
d) NAMP
Answer:-b
178. Which of the following is not a channel of mozilla?
a) Firefox
b) Firefox alpha
c) Firefox Beta
d) Firefox Aurora
Answer:-b
179. Google Chrome has its own task manager, which allows you to view and manage
your memory and CPU usage.
a) True
b) False
Answer:-a
180. Which of the following are automatically loaded and operates as a part of browser?
a) Add-ons
b) Plug-ins
c) Utilities
d) Widgets
Answer:-b
181. Which of the following allows user to view a webpage?
a) Operating System
b) Website
c) Interpreter
d) Internet Browser
Answer:-d
182. What is DOM?
a) Hierarchy of objects in ASP.NET
b) Application programming interface
c) Convention for representing and interacting with objects in html documents
d) Language dependent application programming
Answer:-c
183.

<meta http-equiv="X-UA-Compatible" content="IE=8"> is used to _________


a) make web page compatible only with IE8
b) mimic behaviour of IE8
c) make web page incompatible only with IE8
d) make web page compatible with IE7 and IE8
Answer:-b
184. Which of the following is not a semantic element?
a) <form>
b) <article>
c) <table>
d) <span>
Answer:-d
185. Footer element can’t contain ____________ information.
a) contact information
b) copyright information
c) the author of the document
d) blog post
Answer:-d
186. Which element works as a sidebar?
a) header
b) footer
c) nav
d) aside
Answer:-d
187. Which of the following defines a visible heading for <details> element?
a) <summary>
b) <section>
c) <mark>
d) <main>
Answer:-a
188. Which of the following specifies the main content of the document?
a) <time>
b) <main>
c) <details>
d) <section>
Answer:-b
189. Which element defines additional details?
a) <details>
b) <summary>
c) <main>
d) <aside>
Answer:-a
190. Which of the following specifies relationship between current document and
external resource?
a) <meta>
b) <style>
c) <link>
d) <title>
Answer:-c
191. Which element represents preformatted text?
a) <main>
b) <dir>
c) <dd>
d) <pre>
Answer:-d
192. Which element is called bidirectional isolation?
a) <bdi>
b) <bdo>
c) <br>
d) <b>
Answer:-a
193. Which element is used for bringing attention?
a) <cite>
b) <br>
c) <b>
d) <code>
Answer:-c
194. Which element denotes that the text is a short fragment of computer code?
a) <code>
b) <data>
c) <cite>
d) <dfn>
Answer:-a
195. Which of the following is keyboard input element?
a) <mark>
b) <kbd>
c) <dfn>
d) <em>
Answer:-b
196. Which element prevents the text from automatically wrapping across multiple lines?
a) <em>
b) <kbd>
c) <mark>
d) <nobr>
Answer:-d
197. Which of the following element is known as ruby fallback parenthesis?
a) <rt>
b) <rp>
c) <rtc>
d) <q>
Answer:-b
198. Which element represents a ruby annotation?
a) <rt>
b) <rtc>
c) <ruby>
d) <rp>
Answer:-c
199. Which element is used to enclose inline text?
a) <samp>
b) <small>
c) <s>
d) <rtc>
Answer:- a
200. Which of the following is a generic inline container for phrasing content?
a) <strong>
b) <sub>
c) <span>
d) <sup>
Answer:- c
201. What is CSS?
a) CSS is a style sheet language
b) CSS is designed to separate the presentation and content, including layout, colors,
and fonts
c) CSS is the language used to style the HTML documents
d) All of the mentioned
Answer:-d
202. Which of the following tag is used to embed css in html page?
a) <css>
b) <!DOCTYPE html>
c) <script>
d) <style>
Answer:-d
203. Which of the following CSS selectors are used to specify a group of elements?
a) tag
b) id
c) class
d) both class and tag
Answer:-c
204. Which of the following has introduced text, list, box, margin, border, color, and
background properties?
a) HTML
b) PHP
c) CSS
d) Ajax
Answer:-c
205. Which of the following CSS framework is used to create a responsive design?
a) django
b) rails
c) larawell
d) bootstrap
Answer:-d
206. Which of the following CSS selector is used to specify a rule to bind a particular
unique element?
a) tag
b) id
c) class
d) both class and tag
Answer:-b
207. Which of the following type of HTML tag is used to define an internal style sheet?
a) <script>
b) <link>
c) <class>
d) <style>
Answer:-d
208. Which of the following CSS property is used to make the text bold?
a) text-decoration: bold
b) font-weight: bold
c) font-style: bold
d) text-align: bold
Answer:-b
209. What will be the output of following CSS code snippet?

h1 {color: "green";}

a) nothings happen
b) error occurs
c) heading becomes dark-green
d) heading becomes green
Answer:-a
210. Which of the following CSS style property is used to specify an italic text?
a) style
b) font
c) font-style
d) @font-face
Answer:-c
211. What will be the output of following CSS code snippet?

h1 {color: red text-decoration: underline; font-style: italic;}

a) color: red, text-decoration: underline works


b) only font-style: italic works
c) color: red, text-decoration: underline and font-style: italic all works
d) text-decoration: underline and font-style: italic works
Answer:-b
212. Which of the following are the CSS Extension Prefixes for Webkit?
a) -chrome
b) -web
c) -o-
d) -webkit
Answer:-d
213. Which of the following is the correct syntax to link an external style sheet in the
HTML file?
a) <link rel=”stylesheet” href=”style.css” />
b) <link rel=”stylesheet” src=”style.css” />
c) <style rel=”stylesheet” src=”style.css” />
d) <style rel=”stylesheet” link=”style.css” />
Answer:-a
214. Which of the following is the first CSS specification to become an official W3C
Recommendation?
a) CSS level 2
b) (X)HTML CSS
c) CSS level 1
d) CSS level 2.1
Answer:-c
215. Which of the following function defines a linear gradient as a CSS image?
a) gradient()
b) linear-gradient()
c) grayscale()
d) image()
Answer:-b
216. Which of the following CSS property can be used to set the image as a border
instead of the border style?
a) background-image-source
b) background-image
c) border-image-source
d) border-image
Answer:-c
217. Which of the following CSS property defines the different properties of all four sides
of an element’s border in a single declaration?
a) border-collapse
b) border-width
c) padding
d) border
Answer:-b
218. Which of the following is the correct way to apply CSS Styles?
a) in an external CSS file
b) inside an HTML element
c) inside the <head> section of an HTML page
d) all of the mentioned
Answer:-d
219. Which of the following CSS property sets the font size of text?
a) font-size
b) text-size
c) text
d) size
Answer:-a
220. Which of the following is not the property of the CSS box model?
a) margin
b) color
c) width
d) height
Answer:-b
221. Which of the following CSS property sets what kind of line decorations are added to
an element, such as underlines, overlines, etc?
a) text-decoration
b) text-style
c) text-decoration-line
d) text-line
Answer:-c
222. Which of the following CSS property specifies the look and design of an outline?
a) outline-style
b) outline-format
c) outline-font
d) none of the mentioned
Answer:-a
223. What will be the output of the following CSS code snippet?

span {
border: 1px solid red;
outline: green dotted thick;
}

a) All span elements will have a green thick border and a red outline
b) All span elements will have a red border and a green dotted outline
c) All span elements will have a outer green dotted border and an inner red border
d) All span elements will have an outer red border and inner green dotted border
Answer:-c
224. Which of the following CSS property sets the shadow for a box element?
a) set-shadow
b) box-shadow
c) shadow
d) canvas-shadow
Answer:-b
225. Which of the following CSS property is used to set the color of the text?
a) text-decoration
b) pallet
c) colour
d) color
Answer:-d
226. Which of the following CSS Property controls how an element is positioned?
a) static
b) position
c) fix
d) set
Answer:-b
227. Which of the following CSS selector selects the elements that are checked?
a) :checked
b) E ~ F
c) ::after
d) none of the mentioned
Answer:-a
228. Which of the following is an appropriate value for the overflow element?
a) scroll
b) hidden
c) auto
d) all of the mentioned
Answer:-d
229. Which of the following CSS property is used to specify table borders in CSS?
a) table:border
b) table
c) border
d) none of the mentioned
Answer:-c
230. Which of the following property is used to align the text in a table?
a) text-align
b) align
c) text
d) none of the mentioned
Answer:-a
231. Which of the following CSS Property sets the stacking order of positioned
elements?
a) y-index
b) z-index
c) x-index
d) all of the mentioned
Answer:-b
232. What will be the output of the following CSS code?

div {
border-width:5px;
border-style:dotted solid double dashed;
}

a) Box having dotted bottom outline, solid right outline, double top outline and dashed
left outline
b) Box having dotted bottom outline, solid left outline, double top outline and dashed left
outline
c) Box having dotted top outline, solid right outline, double bottom outline and dashed
left outline
d) Box having dotted top outline, solid left outline, double bottom outline and dashed
right outline
Answer:-c
233. Which of the following property allows a marquee to be used in the case of a text-
overflow?
a) overflow-marquee
b) overflow-style
c) overflow-text
d) none of the mentioned
Answer:-b
234. Which of the following CSS property defines the space between cells in a table?
a) border-spacing
b) border-style
c) border
d) none of the mentioned
Answer:-a
235. Which of the following CSS3 property can be used to allow line breaks within
words?
a) line-break
b) line-wrap
c) word-wrap
d) word-break
Answer:-d
236. CSS stands for __________
a) Color Style Sheets
b) Cascade Sheets Style
c) Cascade Style Sheet
d) Cascading Style Sheets
Answer:-d
237. In CSS, h1 can be called as _______
a) Selector
b) Attribute
c) Value
d) Tag
Answer:-a
238. In css, “color:red” can be called as _____________
a) Selector
b) Rule
c) Declaration
d) Value
Answer:-c
239. Which of the following attributes is used to specify elements to bind style rules to?
a) id
b) class
c) tag
d) all of the mentioned
Answer:-d
240. Which selector is used to specify a rule to bind a particular unique element?
a) id
b) class
c) tag
d) both class and tag
Answer:-a
241. In CSS, “font-size” can be called as ________
a) Selector
b) Rule
c) Property
d) Property-Name
Answer:-d
242. _________ selectors are used to specify a group of elements.
a) id
b) class
c) tag
d) both class and tag
Answer:-b
243. Which of the following tag is used to embed css in html page?
a) <script>
b) <style>
c) <css>
d) <!DOCTYPE html>
Answer:-b
244. __________ has introduced text, list, box, margin, border, color, and background
properties.
a) css
b) html
c) ajax
d) php
Answer:-a
245. Is it the best way to include H1 heading only one time on the web page.
a) True
b) False
Answer:-a
246. Which of the following element is used by the filter property to blur the images?
a) opaque()
b) scatter()
c) blur()
d) all of the mentioned
Answer:-c
247. Which of the following function adjust the brightness of an element’s color, for use
by the filter property?
a) contrast()
b) dark()
c) light()
d) brightness()
Answer:-d
248. Which of the following function adjusts the difference between light and dark
values, for use by the filter property?
a) contrast()
b) dark()
c) light()
d) brightness()
Answer:-a
249. Which of the following function with filter property to create your own sophisticated
effects on DOM elements?
a) create()
b) DOM()
c) custom()
d) none of the mentioned
Answer:-c
250. Which of the following function converts an element’s color to a shade of gray, for
use by the filter property?
a) shade()
b) grayscale()
c) black()
d) brightness()
Answer:-b
251. Which of the following function flips an element’s colors, for use by the filter
property?
a) image()
b) flip()
c) invert()
d) contrast()
Answer:-c
252. Which of the following function applies a saturation effect to an element’s color,
making it appear more or less vivid, for use by the filter property?
a) color()
b) saturation()
c) saturate()
d) none of the mentioned
Answer:-b
253. Which of the following function defines a linear gradient as a CSS image?
a) grayscale()
b) gradient()
c) image()
d) linear-gradient()
Answer:-d
254. Which of the following function two dimensional transformation in matrix format?
a) matrix()
b) matrix2d()
c) matrix3d()
d) perspective
Answer:-a
255. Which of the following function apply a sepia tinge to an element’s color, typical of
old photographs, for use by the filter property?
a) grayscale()
b) sepia()
c) contrast()
d) brightness()
Answer:-b
256. Which of the following value is supposed to be a slightly bolder weight that standard
bold in font attribute?
a) empasize
b) light
c) lighter
d) dark
Answer:-d
257. Which of the following property allows contextual adjustment of inter-glyph spacing,
i.e. the spaces between the characters in text?
a) font-style
b) font-family
c) font-kerning
d) font-variant
Answer:-c
258. Which of the following is not a value for font-style property?
a) normal
b) italic
c) oblique
d) none of the above
Answer:-d
259. Which of the following value specifies whether the user agent is allowed to
synthesize bold or oblique font faces when a font family lacks bold or italic faces?
a) font-weight
b) font-synthesis
c) font-kerning
d) font-variant
Answer:-b
260. Which of the following selects a normal, or small-caps face from a font family?
a) font-weight
b) font-synthesis
c) font-kerning
d) font-variant
Answer:-d
261. Which of the following is not a appropriate value for font-variant property?
a) inherit
b) default
c) large-caps
d) small-caps
Answer:-c
262. Which of the following property adjusts the font-size of the fallback fonts defined
with font-family, so that the x-height is the same no matter what font is used?
a) default
b) font-size-fallback
c) font-adjust
d) font-size-adjust
Answer:-d
263. Which of the following Allows you to expand or condense the widths for a normal,
condensed, or expanded font face?
a) font-style
b) font-stretch
c) font-expand
d) none of the mentioned
Answer:-d
264. Which of the following font-size-adjust is value used in calculating the size of the
fallback fonts?
a) auto
b) number
c) count
d) none
Answer:-b
265. “font-style comes first than font-weight in font attribute”.State true or false.
a) True
b) False
Answer:-b
266. Which of the following is the CSS Extension Prefixes for Webkit?
a) -webkit
b) -o-
c) -web
d) -chrome
Answer:-a
267. Which CSS property is equivalent for the attribute <center>?
a) color
b) margin
c) align
d) font
Answer:-c
268. Which CSS property is Equivalent for the align attribute?
a) float
b) text-align
c) centre
d) float & text-align
Answer:-a
269. Which is the latest version of CSS available?
a) CSS2
b) CSS3
c) CSS3.1
d) CSS4
Answer:-b
270. Which CSS property is equivalent for the attribute <font>?
a) font-family
b) font-style
c) color
d) all of the mentioned
Answer:-b
271. Which of the following CSS property is used to give a line over the text?
a) text-decoration: underline
b) text-decoration: overline
c) text-decoration: line-through
d) text-decoration: none
Answer:-b
272. The first CSS specification to become an official W3C Recommendation is
___________
a) (X)HTML CSS
b) CSS level 2
c) CSS level 2.1
d) CSS level 1
Answer:-d
273. _________ first became a Candidate Recommendation on February 25, 2004, but
it was reverted to a Working Draft on June 13, 2005 for further review.
a) CSS level 1
b) CSS level 2
c) CSS level 3
d) CSS level 2.1
Answer:-d
274. There is no single, integrated ____________________ because it is split into
separate modules.
a) CSS1 specification
b) CSS2 specification
c) CSS3 specification
d) CSS4 specification
Answer:-d
275. Unlike CSS 2, which is a large single specification defining various features?
a) CSS level 1
b) CSS level 2
c) CSS level 3
d) CSS level 2.1
Answer:-c
276. Which of the following CSS3 Color Feature can be used as a macro for whatever
the current color is?
a) CurrentColor keyword
b) HSLa Color
c) HSL Color
d) RGB Color
Answer:-a
277. Which of the following CSS3 Color Feature like RGB color but adds an alpha
channel value to specify the opacity of the color?
a) RGB
b) RGBa
c) RGBaplha
d) AlphaRGB
Answer:-b
278. Which of the following Color Format is a CSS’s six-digit hexadecimal format is the
same as color defined in (X)HTML?
a) 6-Hex Color
b) 3-Hex Color
c) RGBS
d) RGBa
Answer:-a
279. Which of the following Color Format is a CSS2 introduced named color keywords
which allows Web page colors to be matched to an operating system’s color use?
a) HSLa Color
b) Commonly defined named colors
c) System Color Names
d) Specificationdefined named colors
Answer:-c
280. Which of the following Color Format are a 17 defined colors under CSS 2.1?
a) HSLa Color
b) Commonly defined named colors
c) System Color Names
d) Specificationdefined named colors
Answer:-d
281. Which of the following Color Format is a CSS colors can also be defined using the
keyword rgb, followed by three numbers between 0 and 255, contained in parentheses
and separated by commas, with no spaces between them?
a) RGB Color
b) RGBa Color
c) HSL Color
d) HSLa Color
Answer:-a
282. Which of the following Color Format is a CSS3 HSL value with a fourth value to set
the alpha channel value for the color to define the opacity of the element?
a) RGB Color
b) RGBa Color
c) HSL Color
d) HSLa Color
Answer:-d
283. Which of the following Selector selects an element if it’s the only child of its parent
with its type?

a) @media
b) :target
c) ::selection
d) :only-of-type
Answer:-d
284. Which of the following Selector same as :firstline; changed under CSS3 to make
pseudoelements obvious?

a) :first-letter
b) :last-child
c) :first-line
d) ::first-line
Answer:- d

285. What does HSL stands for?


a) Hue Specified Lightness
b) Hue Spot Lightness
c) Hue Saturation Lightness
d) None of the mentioned
Answer:-c
286. Which of the following is not an Absolute Unit?
a) px
b) em
c) pt
d) mm
Answer:-b
287. Which of the following unit represent the viewport’s width?
a) vh
b) vmin
c) vw
d) ch
Answer:-c
288. Which of the following property sets in a shorthand form any or all background
properties?
a) color
b) wrap
c) background
d) all of the mentioned
Answer:-c
289. Which of the following Color Format can also be defined using the keyword rgb,
followed by three numbers between 0 and 255, contained in parentheses and separated
by commas, with no spaces between them?
a) RGB Color
b) RGBa Color
c) HSL Color
d) HSLa Color
Answer:-a
290. Which of the following is not a attribute of the audio element?
a) controls
b) src
c) check
d) loop
Answer:-c
291. Which of the following element is used to specify multiple media resources for
media elements like audio and video?

a) <source>
b) <link>
c) <script>
d) <src>
Answer:-a

292. Which of the following Protocol enables a hyperlink to access a file on the local file
system?
a) https
b) ftp
c) file
d) telnet
Answer:-c
293. Which of the following element is used for linking a External Files to the html page?

a) <script>
b) <style>
c) <link>
d) all of the above

Answer:- c

294. Which of the following attribute specifies the URL of the linked resource?
a) src
b) link
c) rel
d) href
Answer:-d
295. Which of the following color has this value #ff0000?
a) blue
b) green
c) red
d) yellow
Answer:-c
296. Which of the following tag is used to linked information should be placed inside?
a) <head>
b) <html>
c) <div>
d) <body>
Answer:-a
297. Which of the following tag can be used to embed a Document-wide styles in a
document’s head element?
a) <head>
b) <style>
c) <script>
d) <html>
Answer:-b
298. The ________________ directive allows style sheets to be grouped and joined
together, though some might wonder what the value of this function is given what linked
styles provide.
a) <head>
b) <style>
c) <script>
d) @import
Answer:-d
299. Which of the following measurement defines a measurement relative to a font’s x-
height?
a) ex
b) em
c) pt
d) px
Answer:-a
300. Which of the following measurement defines measurement as a percentage?
a) %
b) cm
c) em
d) in
Answer:- a
301. Which of the following property sets the font size of text?
a) text-size
b) font-size
c) size
d) text
Answer:-b
302. Which of the following property sets a variation of the specified or default font
family?
a) height
b) font-weight
c) default
d) font-variant
Answer:-d
303. Which of the following property defines labels for a list of items?
a) list-style-type
b) list-style-image
c) list-style
d) list
Answer:-a
304. Which of the following property assigns a graphic image to a list item?
a) list-style-type
b) list-style-image
c) list-style
d) list
Answer:-b
305. Which of the following property sets the amount of spacing between letters?
a) space
b) line-height
c) letter-spacing
d) letter-space
Answer:-c
306. Which of the following CSS property defines the different properties of all four sides
of an element’s border in a single declaration?
a) border
b) padding
c) border-collapse
d) border-width
Answer:-d
307. Identify the CSS property defining bottom-left corner shape of the border?
a) border-radius
b) border-corner-radius
c) border-bottom-left-radius
d) border-left-radius
Answer:-c
308. Select the CSS property that sets the width of an element’s bottom border?
a) border-width
b) border-bottom
c) border-width-down
d) border-bottom-width
Answer:-d
309. Which of the following CSS property border-color property sets the color of an
element’s four borders?
a) border-background
b) border-background-color
c) border-color
d) all of the mentioned
Answer:-c
310. Choose the CSS property that can be used for collapsing the borders between
table cells?
a) border
b) collapse-border
c) border-collapse
d) border-cell
Answer:-c
311. Which CSS property can be used to set the image as border instead of the border
style?
a) background-image
b) border-image
c) background-image-source
d) border-image-source
Answer:-d
312. In how many way border-image-width CSS property can be defined?
a) 4
b) 6
c) 8
d) 9
Answer:-d
313. Which of the following is not an appropriate value for border-collapse?
a) all
b) collapse
c) inherit
d) separate
Answer:-a
314. Which of the following specifies the distance between the borders of adjacent cells?
a) border-spacing-cell
b) border-width-spacing
c) border-spacing
d) cell-spacing
Answer:-c
315. Which of the following property defines the border-width, border-style and border-
color of an element’s top border in a single declaration?
a) border
b) border-top
c) border-top-corner
d) border-top-style
Answer:-b
316. Which of the following CSS property is used to set the text formatting?
a) font
b) font-style
c) text-decoration
d) all of the mentioned
Answer:-c
317. Which of the following sets the color of any text decoration, such as underlines,
overlines, and strike throughs?
a) text-font
b) text-format
c) text-color
d) text-decoration-color
Answer:-d
318. Which of the following sets what kind of line decorations are added to an element,
such as underlines, overlines, etc?
a) text-style
b) text-decoration
c) text-line
d) text-decoration-line
Answer:-a
319. Which of the following text-decoration value specifies each line of text has a line
above it?
a) line
b) underline
c) overline
d) blink
Answer:-c
320. Which of the following
a) text-overline
b) text-overline-decoration
c) text-overline-width
d) text-decoration-overline-width
Answer:-c
321. Which of the following CSS property determines how overflowed content that is not
displayed is signaled to the users?
a) text-flow
b) text-underflow
c) text-overflow
d) none of the mentioned
Answer:-c
322. Which of the following sets the mode for the overline text decoration, determining
whether the text decoration affects the space characters or not?
a) text-decoration
b) text-mode-overflow
c) text-mode
d) text-overline-mode
Answer:-b
323. Which of the following specifies what parts of an element’s content are skipped
over when applying any text decoration?
a) @font-text
b) font-style
c) text-skip
d) text-decoration-skip
Answer:-d
324. Which of the following is not a appropriate value for text-overline-width?
a) thin
b) medium
c) <number>
d) none of the mentioned
Answer:-d
325. Which of the following property applies one or more drop shadows to the text?
a) text-shadow
b) text-effect
c) text-format
d) text-decoration-shadow
Answer:-a
326. Which of the following property sets the apparent position (in stereo sound) of the
synthesized voice for spoken media?
a) voice-balance
b) media-balance
c) balance
d) none of the mentioned
Answer:-a
327. Which of the following property allows the author to explicitly set the amount of time
it should take a speech synthesizer to read an element’s content?
a) @media
b) voice
c) voice-duration
d) all of the mentioned
Answer:-c
328. Which of the following property sets the speaker’s voice used by a speech media
agent to read an element?
a) voice-family
b) voice-check
c) voice-control
d) none of the mentioned
Answer:-a
329. Which of the following property determines how much variation in pitch or tone will
be created by the speech synthesize when reading an element?
a) voice-pitch
b) voice-range
c) voice-stress
d) none of the mentioned
Answer:-b
330. Which of the following property sets the speed at which the voice synthesized by a
speech media agent will read content?
a) voice-volume
b) voice-pitch
c) voice-stress
d) voice-rate
Answer:-d
331. Which of the following property sets pitch or tone (high or low) for the synthesized
speech when reading an element; the pitch may be specified absolutely or relative to the
normal pitch for the voice-family used to read the text?
a) voice-check
b) voice-format
c) voice-pitch
d) voice-volume
Answer:-c
332. Which of the following property sets the volume for spoken content in speech
media. It replaces the deprecated volume property?
a) voice-volume
b) volume
c) !important
d) @media
Answer:-a
333. Which of the following is not a appropriate value for voice-volume?
a) silent
b) soft
c) hard
d) <number>
Answer:-c
334. Which of the following is not a appropriate value for voice-balance?
a) left
b) leftwards
c) up
d) centre
Answer:-c
335. Which of the following is not a appropriate value for voice-rate?
a) slow
b) fast
c) medium
d) none of the mentioned
Answer:-d
336. Which of the following property is used to draw a line around elements outside the
borders?
a) line
b) padding
c) outline
d) border
Answer:-c
337. Choose the option that correctly specifies the output of the following CSS.

span {
border: 1px solid red;
outline: green dotted thick;
}
a) All span elements will have a red border and a green dotted outline
b) All span elements will have a green thick border and a red outline
c) All span elements will have an outer red border and inner green dotted border
d) All span elements will have a outer green dotted border and an inner red border
Answer:-d
338. Which of the following property specifies the color of an outline?
a) color-outline
b) outline-color
c) outline-style-color
d) none of the mentioned
Answer:-b
339. Identify the outline property that specifies the amount of area extended beyond the
border box.
a) outset3d
b) inset
c) outset
d) inset3d
Answer:-c
340. Which of the following value specifies a dashed outline?
a) dash
b) dashed
c) double-dash
d) all of the mentioned
Answer:-b
341. Which of the following property specifies the look and design of an outline?
a) outline-font
b) outline-style
c) outline-format
d) none of the mentioned
Answer:-b
342. Which of the following values specifies a 3D grooved outline?
a) initial
b) ridge
c) groove
d) groove3d
Answer:-c
343. Select the output of the following CSS.

div {
border-width:5px;
border-style:dotted solid double dashed;
}
a) Box having dotted top outline, solid right outline, double bottom outline and dashed
left outline
b) Box having dotted top outline, solid left outline, double bottom outline and dashed
right outline
c) Box having dotted bottom outline, solid right outline, double top outline and dashed
left outline
d) Box having dotted bottom outline, solid left outline, double top outline and dashed left
outline
Answer:-a
344. Which of the following specifies the width of an outline?
a) outline-size
b) outline-width
c) outline-height
d) both outline-size and outline-width
Answer:-b
345. Which of the following value specifies a solid outline?
a) bold
b) rock
c) solid
d) dashed
Answer:-c
346. What does all media type is used for?
a) For use with all devices
b) For use with speech synthesizers
c) For use with handheld devices
d) For use with tactile Braille devices
Answer:-a
347. What does projection media type is used for?
a) For use with projected media (direct computer-to-projector presentations), or printing
transparencies for projection.
b) For use with color computer screens
c) For use with handheld devices
d) For use with television-type devices
Answer:-a
348. What does tty media type is used for ?
a) For use with low-resolution teletypes, terminals, or other devices with limited display
capabilities.
b) For use with Braille printers.
c) For use with speech synthesizers.
d) For use with projected media (direct computer-to-projector presentations), or printing
transparencies for projection.
Answer:-a
349. What does aural media type is used for ?
a) For use with low-resolution teletypes, terminals, or other devices with limited display
capabilities
b) For use with Braille printers
c) For use with speech synthesizers
d) For use with projected media (direct computer-to-projector presentations), or printing
transparencies for projection
Answer:-c
350. What does braille media type is used for?
a) For use with all devices
b) For use with speech synthesizers
c) For use with handheld devices
d) For use with tactile Braille devices
Answer:-b
351. The __________ rule makes it possible to define different style rules for different
media types in the same stylesheet.
a) audio/video
b) sink
c) @media
d) @canvas
Answer:-c
352. What is the way to specify media dependencies for style sheets ?
a) Specify the target medium from a style sheet with the @media or @import at-rules
b) Specify the target medium within the document language
c) both Specify the target medium from a style sheet with the @media or @import at-
rules and Specify the target medium within the document language
d) none of the mentioned
Answer:-c
353. ____________ types are mutually exclusive in the sense that a user agent can only
support one media type when rendering a document.
a) tv
b) tty
c) media
d) audio
Answer:-c
354. If an @media/@import rule contains a malformed media type (not an identifier) then
the statement is valid. State true or false.
a) True
b) False
Answer:-b
355. Media type names are case-insensitive. State true or false.
a) True
b) False
Answer:-a
356. Which of the following property defines in a shorthand form the width, style, and
color for the bottom border of an element?
a) border-bottom
b) border-bottom-color
c) border-bottom-all
d) none of the mentioned
Answer:-a
357. Which of the following property sets the width of an element’s bottom border?
a) border
b) border-collapse
c) border-bottom-width
d) none of the mentioned
Answer:-c
358. Which of the following property defines whether table cell borders are connected or
separate?
a) border-table
b) border
c) border-collapse
d) none of the mentioned
Answer:-c
359. Which of the following property defines the style for the right border of an element?
a) border-spacing
b) border-spacing
c) border-right
d) border-right-style
Answer:-c
360. Which of the following property defines the color of an element’s top border?
a) border-color
b) border-top
c) border-top-color-webkit
d) border-top-color
Answer:-d
361. Which of the following property sets the width of an element’s complete border?
a) border-width
b) width
c) border-depth
d) none of the mentioned
Answer:-a
362. Which of the following property defines the visual style of up to four different sides
of a border?
a) border-style
b) border
c) border-top
d) none of the mentioned
Answer:-a
363. Which of the following defines in a shorthand form the width, style, and color for the
top border of an element?
a) border-up
b) border-bottom
c) border-style
d) none of the mentioned
Answer:-d
364. Which of the following property defines the y (vertical) coordinate for a positioned
element, relative to the bottom of the enclosing object or browser window?
a) border
b) bottom
c) position
d) none of the mentioned
Answer:-b
365. Which of the following property specifies the placement of an element in relation to
floating objects?
a) clear
b) color
c) space
d) none of the mentioned
Answer:-a
366. Which of the following property specifies the transparency of an element?
a) alpha
b) opacity
c) opac
d) none of the mentioned
Answer:-b
367. Which of the following property defines the offset from an element’s border and its
outline?
a) outline-border
b) outline-offset
c) outline-radius
d) none of the mentioned
Answer:-b
368. Which of the following property allows a marquee to be used in the case of a text
overflow?
a) overflow-style
b) overflow-text
c) overflow-marquee
d) none of the mentioned
Answer:-a
367. Which of the following property defines how content should behave when it
exceeds the width of its enclosing element?
a) overflow-y
b) overflow-x
c) overflow-z
d) overflow-width
Answer:-b
368. Which of the following property is used to give a 3-D sense of depth to an element?
a) animation
b) perspec
c) sense
d) perspective
Answer:-d
369. Which of the following property is used to define whether an element should be
resized and, if so, upon what axis?
a) axis
b) resize
c) set-origin
d) set-axis
Answer:-b
370. Which of the following property defines the alignment of Ruby text as defined by a
<rt> tag, in relation to base text defined by a <ruby> tag?
a) ruby-align
b) ruby-text
c) ruby
d) none of the mentioned
Answer:-a
371. Which of the following property sets the base color for a scroll bar, which will
include the scroll box, track, and scroll arrows?
a) scrollbar-base
b) scrollbar-base-color
c) scrollbar-background
d) none of the mentioned
Answer:-c
372. Which of the following property defines a color for the face of a scroll bar, including
arrow regions and the scroll box?
a) scrollbar-face
b) scrollbar-face-color
c) scrollbar-face-background
d) scrollbar-background
Answer:-c
373. Which of the following property defines a highlight color for a scroll bar and scroll
arrows?
a) scrollbar-color
b) scrollbar-highlight
c) scrollbar-highlight-color
d) scrollbar-highlight-background
Answer:-c
374. Which of the following property sets the size of the font?
a) font-size
b) font-variant
c) font-style
d) font-weight
Answer:-a
375. Which of the following Property controls the display of small caps?
a) font-size
b) font-variant
c) font-style
d) font-weight
Answer:-b
376. Which of the following font-weight property make the text lighter in relation to its
parent?
a) unfocus
b) normal
c) lighter
d) normal
Answer:-c
377. Which of the following property converts text to initial capitals, all uppercase, or all
lowercase?
a) text-transform
b) text
c) text-decoration
d) text-uppercase
Answer:-a
378. Which of the following font-variant property render text using the same letter case
as in the underlying code?
a) bold
b) small-caps
c) normal
d) none of the mentioned
Answer:-c
379. Which of the following property sets the alignment of the last line of a text block?
a) overflow-wrap
b) text-align-last
c) text-transform
d) text-indent
Answer:-b
380. Which of the following property controls how spaces and word wrapping are
handled?
a) spacing
b) text-space
c) white-space
d) word-spacing
Answer:-c
381. Which of the following property specifies what line decorations, if any, are added to
the text?
a) text-decoration-line
b) text-line-decoration
c) text-decoration-style
d) text-style-decoration
Answer:-a
382. Which of the following property applies one or more shadows to text?
a) text-shadow
b) shadowed
c) shadow
d) word-shadow
Answer:-a
383. Which of the following property allows long text, such as a URL, to be broken if it
would otherwise over?
a) text-transform
b) word-wrap
c) text-overflow
d) text-indent
Answer:-b
384. Which of the following is used to associate a font name to be used in a style sheet
with some downloadable font?
a) @font-face
b) @charset
c) @media
d) !important
Answer:-a
385. Which of the following is not value for the font-stretch(Font descriptor)?
a) normal
b) 50%
c) expanded
d) ultra-expanded
Answer:-b
386. Which of the following font format is supported by all the latest browser?
a) EOT
b) WOFF2
c) SVG
d) WOFF
Answer:-d
387. Which of the following media query describe output style portrait if height is greater
than or equal to width, landscape if the opposite?
a) grid
b) monochrome
c) resolution
d) orientation
Answer:-d
388. Which of the following media query describe the ratio of the width to the height of
the media?
a) ratio
b) aspect-ratio
c) deviceaspect-ratio
d) resolution
Answer:-b
389. Which of the following media query describe describes the height of the screen or
full height of the output page?
a) height
b) aspect-ratio
c) device-height
d) resolution
Answer:-c
390. Which of the following property sets the style of a font?
a) font
b) style
c) font-style
d) @font-face
Answer:-c
391. Which of the following property specifies whether an element is an accelerator
indicator or not?
a) push
b) accelerator
c) jump-start
d) animation
Answer:-b
392. Which of the following property sets a variation of the specified or default font
family?
a) fonts
b) font-style
c) font-variant
d) font-weight
Answer:-c
393. The @font-face rules assign different names to the regular and bold versions of the
font.State true or false.
a) True
b) False
Answer:-a
394. Which of the following property adds padding to the top of an element?
a) height
b) padding-height
c) top
d) padding-top
Answer:-d
395. Which of the following display property value is described by treats the element as
inline?
a) inline-block
b) list-item
c) block
d) inline
Answer:-d
396. Which of the following property defines the style for the bottom border of an
element?
a) border-bottom-style
b) border-collapse
c) border-style-bottom
d) none of the mentioned
Answer:-a
397. Which of the following property defines the style for the left border of an element?
a) border-style
b) border-left-style
c) border-left-width
d) border-right
Answer:-b
398. Which of the following visibility property value is described by The element is not
visible, but the layout of surrounding elements is not affected?
a) visible
b) hidden
c) collapse
d) none of the mentioned
Answer:- b
399. Which of the following display property value is described by used internally by
browsers to create list items. Of no practical value to web designers?
a) inline-block
b) list-item
c) group
d) none
Answer:-b
400. Which of the following property controls the horizontal overflow of a block or inline
block?
a) overflow-x
b) overflow
c) overflow-y
d) overflow-k
Answer:-a
401. Which of the following Overflow property value is described by scrollbars should be
provided if the content is too big, but actual implementation is left up to the browser?
a) visible
b) scroll
c) auto
d) hidden
Answer:-c
402. Which of the following property sets a consistent margin on all four sides of the
affected element?
a) boder
b) margin
c) padding
d) none fof the mentioned
Answer:-b
403. Which of the following box-sizing property value is described by width and height
include content, padding, and borders?
a) border-box
b) content-box
c) content-box
d) none fof the mentioned
Answer:-a
404. Which of the following property sets the background image to scroll or not to scroll
with its associated element’s content?
a) background-scroll
b) background-attach
c) background-attachment
d) background-allowance
Answer:-c
405. Which of the following property sets an element’s background color?
a) background-image
b) background-color
c) background-colors
d) background-position
Answer:-b
406. Which of the following property defines the color of an element’s right border?
a) border-right-colors
b) border-right-color
c) border-right
d) border-color
Answer:-b
407. Which of the following property defines the space between cells in a table?
a) auto
b) border
c) spacing
d) border-spacing
Answer:-d
408. Which of the following property defines the visual style of up to four different sides
of a border?
a) border-color
b) border-img
c) border-visual
d) border-style
Answer:-b
409. Which of the following property defines in a shorthand form the width, style, and
color for the top border of an element?
a) border-style
b) border-height
c) border-width
d) border-top
Answer:-d
410. Which of the following property sets the shadow for a box element?
a) shadow
b) set-shadow
c) canvas-shadow
d) box-shadow
Answer:-b
411. Which of the following property defines a shadow effect for text?
a) box-shadow
b) img-shadow
c) text-shadow
d) none of the mentioned
Answer:-d
412. Which of the following property defines a shadow color for the right and bottom
edges of a scroll bar?
a) scrollbar-darkshadow
b) scrollbar-shadow-color
c) scrollbar-darkshadow-color
d) none of the mentioned
Answer:-c
413. Which of the following property defines a color for the right and bottom edges of a
scroll bar.
a) scrollbar-color
b) scrollbar-darkshadow-color
c) scrollbar-shadow
d) scrollbar-shadow-color
Answer:-d
414. Which of the following property sets list-style-type, list-style-position, and liststyle-
image?
a) style
b) list-style
c) menu-style
d) img-style
Answer:-b
415. Which of the following property assigns a graphic image to a list item?
a) list-image-style
b) list-style-image
c) list-image
d) none of the mentioned
Answer:-b
416. Which of the following property specifies whether the labels for an element’s list
items are positioned inside or outside the “box” defined by the listed item?
a) list-style
b) list-position
c) list-style-position
d) list-position-style
Answer:-c
417. Which of the following property defines labels for a list of items?
a) list-shape
b) list-style
c) list-type
d) list-style-type
Answer:-d
418. Which of the following property defines in a shorthand form the width, style, and
color for all four sides of an element’s border?
a) border
b) border-style
c) border-color
d) border-all
Answer:-a
419. Which of the following property defines in a shorthand form the width, style, and
color for the left border of an element?
a) border
b) border-style
c) border-left
d) none of the mentioned
Answer:-b
420. Which of the following property is used to round border corners?
a) border-corner
b) border-round
c) border-radius
d) none of the mentioned
Answer:-c
421. Which of the following property influences the horizontal alignment of an element,
making it “float” toward the left or right margin of its containing element?
a) float
b) float-left
c) float-right
d) float-align
Answer:-d
422. Which of the following property sets the font face to be used for text?
a) font
b) font-text
c) font-family
d) none of the mentioned
Answer:-c
423. Which of the following property sets the font size of text?
a) font
b) font-text
c) font-size
d) none of the mentioned
Answer:-c
424. Which of the following CSS Gradient Functions sets the direction and colors of a
gradient that fades from one color to the next in a straight line?
a) gradient()
b) line-gradient()
c) linear-gradient()
d) none of the mentioned
Answer:-d
425. Which of the following CSS Gradient Functions creates a circular or elliptical
gradient, and optionally sets its shape, size, and position?
a) radial-gradient()
b) circular-gradient()
c) elliptical-gradient()
d) none of the mentioned
Answer:-c
426. Which of the following CSS Gradient Functions Creates a radial gradient that
repeats infinitely?
a) repeat-radial-gradient()
b) repeating-radial-gradient()
c) infinite-radial-gradient()
d) none of the mentioned
Answer:-a
427. Which of the following is not a browser-specific versions of linear-gradient()?
a) -moz-linear-gradient()
b) -o-linear-gradient()
c) -mac-linear-gradient()
d) -webkit-linear-gradient()
Answer:-c
428. Which of the following argument is not accepted by radial-gradient() function?
a) Shape
b) Time
c) Color stops
d) Position
Answer:- b
429. Which of the following function creates a CSS gradient image that can be used
anywhere an image URL is required, including background-image, border-image, and
list-style properties?
a) canvas
b) gradient
c) animation
d) color
Answer:-b
430. Which of the following option best explain this code “background-image: repeating-
radial-gradient(circle at 50% 100%, #FFEB79, #D9CC3C 5%);”?
a) Creating Infinte circular Gradients
b) Creating Repeating Circular Gradients
c) Creating Repeating Radial Gradients
d) Creating Infinite Radial Gradients
Answer:-c
431. Which of the following option best explain this code “background-image: repeating-
linear-gradient(-45deg, #426A77, #FFF 6px);”?
a) Creating Straight Stripes
b) Creating Cubic Stripes
c) Creating Spiral Stripes
d) Creating Diagonal Stripes
Answer:-d
432. Which of the following option best explain this code “background-image: repeating-
linear-gradient(to right, #D9CC3C, #FFEB79 5%, #D9CC3C 10%);”?
a) Creating a Repeating Gradient
b) Creating a Mix Repeating Gradient
c) Creating a Shadow Repeating Gradient
d) Creating a Smooth Repeating Gradient
Answer:-d
433. Which of the following media feature describes the number of entries in the color
lookup table of the output device
a) color
b) color-index
c) color-value
d) color-@media
Answer:-b
434. Which of the following Viewport Property sets the initial scaling factor?
a) scale
b) initial-scale
c) minimum-scale
d) user-scale
Answer:-b
435. Which of the following Viewport Property determines whether the display can be
zoomed in
and out?
a) scale
b) set-scale
c) adjust-scale
d) user-scalable
Answer:-d
436. Which of the following @viewport Property sets the viewport height in the same
way as width?
a) height
b) width
c) viewpor-width
d) none of the mentioned
Answer:-a
437. Which of the following @viewport Property locks the document in the specified
orientation, portrait or landscape?
a) orientation
b) resolution
c) landscape
d) portrait
Answer:-a
438. Which of the following Media Query describe the ratio of the device width to the
device height of the media?
a) device-aspect
b) device-aspect-ratio
c) device-aspect-query
d) none of the mentioned
Answer:-c

439. Which of the following Media Query determines if output is grid, like a simple
terminal or phone, or bitmap, like a standard monitor or printer?
a) monochrome
b) grid
c) resolution
d) device-height
Answer:-b
440. Which of the following Media Query describes the scanning method of a TV?
a) orientation
b) scan
c) resolution
d) none of the mentioned
Answer:-b
441. Which of the following Media Query determines if output is monochrome and how
many bits are used for gray display?
a) gray
b) chrome
c) monochrome
d) none of the mentioned
Answer:-c
442. A media query consists of a media type and zero or more expressions that check
for the conditions of particular media features. State true or false.
a) True
b) False
Answer:-a
443. Which of the following is the correct way to applying style to a document?
a) Use an external style sheet, either by importing it or by linking to it
b) Directly embed a document-wide style in the head element of the document
c) Set an inline style rule using the style attribute directly on an element
d) All of the mentioned
Answer:-d
444. What will be the output of following code snippet?

<style h1 {color: green;}>


<h1>Hello</h1>
a) h1 heading becomes green
b) error
c) h1 heading disappears
d) nothing happens
Answer:-c
445. What will be the output of below mentioned code snippet?

<p style="color: red">text</p>

a) make that specific paragraph red.


b) error
c) nothing happens
d) none of the mentioned
Answer:-a
446. The _______property is used to set the color of the text.
a) pallet
b) colour
c) color
d) text-decoration
Answer:-c
447. Which of the following is the correct way to apply Styles?
a) inside an HTML element
b) inside the section of an HTML page
c) in an external CSS file
d) all of the mentioned
Answer:-d
448. Which of the following CSS list properties is/are correct?
a) Set different list item markers for ordered lists
b) Set different list item markers for unordered lists
c) Set an image as the list item marker
d) All of the mentioned
Answer:-d
449. A ___________ is used to define a special state of an element.
a) pseudo-tag
b) pseudo-element
c) pseudo-id
d) pseudo-class
Answer:-d
450. The __________ property specifies the type of positioning method used for an
element.
a) align
b) float
c) position
d) padding
Answer:-c
451. Which style is this?

<body style="background-color: lightcyan">


a) Inline Styles
b) External Style Sheet
c) External Style Sheettyle Sheet
d) None of the mentioned
Answer:-a
452. Is this correct way to apply css.State true or false.

<link rel="stylesheet" type="text/css" href="mystyle.css">


a) True
b) False
Answer:-a
453. What type of selector is used in this case?

p {line-height: 150%;}
a) class Selectors
b) element Selectors
c) id Selectors
d) none of the mentioned
Answer:-b
454. By applying an ___________ a style can be applied to just a single tag.
a) class rule
b) element rule
c) id rule
d) none of the mentioned
Answer:-c
455. The _____________ attribute is used to define the name(s) of the class(es) to
which a particular tag belongs.
a) class
b) element
c) id
d) none of the mentioned
Answer:-a
456. What will be the output of below mentioned code snippet?

p strong {background-color: yellow;}

a) Strong have yellow background


b) Strong element within a p element have a yellow background
c) Both p and strong have yellow background
d) None of the mentioned
Answer:-b
457. 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
Answer:-c
458. Which of the following selectors selects any tag with an id attribute set?

a) E#id
b) .class
c) #id
d) *
Answer:-c

459. Which of the following selectors selects direct descendents?

a) E &gt; F
b) E F
c) E + F
d) E ~ F
Answer:-a
460. Which of the following selectors selects siblings?
a) E.class
b) E ~ F
c) *
d) E, F, G
Answer:-b
461. Which of the following selectors selects the specified elements of type E with a
particular class value?
a) E.class
b) E ~ F
c) *
d) E, F, G
Answer:-a
462. Which of the following selectors selects adjacent siblings?
a) E &gt; F
b) E F
c) E + F
d) E ~ F
Answer:-c
463. Which of the following selector selects all elements of E that have the attribute attr
that end with the given value?
a) E[attr^=value]
b) E[attr$=value]
c) E[attr*=value]
d) none of the mentioned
Answer:-b
464. Which of the following selector selects the elements that are checked?
a) E ~ F
b) ::after
c) :checked
d) none of the mentioned
Answer:-c
465. Which of the following selector selects the elements that are the default among a
set of similar elements?
a) :default
b) :%
c) :disabled
d) none of the mentioned
Answer:-a
466. Which of the following selector selects an element that has no children?
a) :empty
b) :nochild
c) :inheritance
d) :no-child
Answer:-a
467. Which of the following selector selects the elements that are currently enabled?
a) :element
b) :empty
c) :enabled
d) none of the mentioned
Answer:-c
468. Which of the following selector selects the element that is the first child of its parent
that is of its type?
a) :first-of-type
b) :last-child
c) ::first-line
d) ::first-letter
Answer:-a
469. Which of the following selector selects elements that do not match the selector s?
a) :!(s)
b) :nth-child(s)
c) :not(s)
d) none of the mentioned
Answer:-c
470. Which of the following selector selects an element if it’s the only child of its parent?
a) :root
b) :nth-oftype(n)
c) :only-child
d) none of the mentioned
Answer:-c
471. Which of the following selector selects the element that is the target of a referring
URI?
a) :target
b) :selection
c) ::selection
d) :URI
Answer:-a
472. Which of the following selector applies styles to elements that are valid per HTML5
validations set either with the pattern or type
attributes?
a) :valid
b) :required
c) :optional
d) :invalid
Answer:-a
473. Which of the following element is used within the table element to define a caption?

a) <tablecaption>
b) <caption>
c) <table-cap>
d) <table-caption>

Answer:-b

474. Which of the following property is used to specify table borders in CSS?
a) table
b) border
c) table:border
d) none of the mentioned
Answer:-b
475. Which of the following property sets whether the table borders are collapsed into a
single border or separated:?
a) border
b) border-collapse
c) collapse
d) table-border
Answer:-b
476. Which of the following property is used to change the width of table?
a) width
b) table
c) table-width
d) resize
Answer:-a
477. Which of the following property sets the vertical alignment?
a) align
b) vertical
c) vertical-align
d) vertical-alignment
Answer:-b
478. Which of the following property is used to control the space between the border and
content in a table?
a) border
b) margin
c) padding
d) resize
Answer:-c
479. Which of the following property is used to change the background in a table?
a) table-background
b) background
c) color
d) none of the mentioned
Answer:-b
480. Which of the following property is used to change the height of a table?
a) height
b) table-height
c) resize
d) position-y
Answer:-a
481. Which of the following property is used to align the text in a table?
a) align
b) text
c) text-align
d) none of the mentioned
Answer:-c
482. Which of the following property is used to set order in a table?
a) border
b) padding
c) dotted
d) text
Answer:-a
483. Which property is used to add space inside the text field?
a) padding
b) margin
c) number
d) password
Answer:-a
484. Which one can animate the width of search input when get focus?
a) focus
b) transition
c) outline
d) color
Answer:-b
485. Which of the following will insert generated content in the counter?
a) content
b) counter-reset
c) counter-increment
d) counter()
Answer:-a
486. Which of the following is not the pseudo class for CSS Basic UI Level3?
a) :optional
b) :read-only
c) :valid
d) :checked
Answer:-d
487. Which is not a Mozilla CSS Extension?
a) ::-webkit-input-placeholder
b) :-moz-placeholder
c) –moz-ui-valid
d) :-moz-submit-invalid
Answer:-a
488. Which of the following is an extension to the common JavaScript framework?
a) Niceforms
b) Uni-forms
c) Formalize
d) jQuery UI
Answer:-c
489. Which of the following will provide date pickers?
a) jQuery UI
b) Niceforms
c) WebShim
d) Twitter Bootstrap
Answer:-a
490. Which of the following helps to deal with HTML5 support?
a) Twitter Bootstrap
b) WebShim
c) jQuery UI
d) Niceforms
Answer:-b
491. Which is not a WebKit value?
a) push-button
b) menulist
c) radio
d) tooltip
Answer:-d
492. Which is not a Mozilla value?
a) caret
b) resizer
c) listbox
d) scrollbar
Answer:-a
493. Which is not the property of CSS box model?
a) width
b) height
c) margin
d) color
Answer:-d
494. What is JavaScript?
a) JavaScript is a scripting language used to make the website interactive
b) JavaScript is an assembly language used to make the website interactive
c) JavaScript is a compiled language used to make the website interactive
d) None of the mentioned
Answer:-a
495. Which of the following is correct about JavaScript?
a) JavaScript is an Object-Based language
b) JavaScript is Assembly-language
c) JavaScript is an Object-Oriented language
d) JavaScript is a High-level language
Answer:-a
496. Among the given statements, which statement defines closures in JavaScript?
a) JavaScript is a function that is enclosed with references to its inner function scope
b) JavaScript is a function that is enclosed with references to its lexical environment
c) JavaScript is a function that is enclosed with the object to its inner function scope
d) None of the mentioned
Answer:-b
497. What will be the output of the following JavaScript code snippet?

<p id="demo"></p>
var txt1 = "Sanfoundry_";
var txt2 = "Javascriptmcq";
document.getElementById("demo").innerHTML = txt1 + txt2;

a) error
b) Sanfoundry_ Javascriptmcq
c) undefined
d) Sanfoundry_Javascriptmcq
Answer:-d
498. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
var js = 10;
js *= 5;
document.getElementById("demo").innerHTML = js;
</script>

a) 10
b) 50
c) 5
d) Error
Answer:-b
499. Arrays in JavaScript are defined by which of the following statements?
a) It is an ordered list of values
b) It is an ordered list of objects
c) It is an ordered list of string
d) It is an ordered list of functions
Answer:-a
500. What will be the output of the following JavaScript code?

// JavaScript Comparison Operators


function compare()
{
int num=2;
char b=2;
if(a==b)
return true;
else
return false;
}

a) false
b) true
c) compilation error
d) runtime error
Answer:-b
501. What will be the output of the following JavaScript code snippet?

// JavaScript Equalto Operators


function equalto()
{
int num=10;
if(num==="10")
return true;
else
return false;
}

a) false
b) true
c) compilation error
d) runtime error
Answer:-a
502. Will the following JavaScript code work?

var js = (function(x) {return x*x;}(10));

a) Exception will be thrown


b) Memory leak
c) Error
d) Yes, perfectly
Answer:-d
503. Which of the following is not javascript data types?
a) Null type
b) Undefined type
c) Number type
d) All of the mentioned
Answer:-d
504. Where is Client-side JavaScript code is embedded within HTML documents?
a) A URL that uses the special javascript:code
b) A URL that uses the special javascript:protocol
c) A URL that uses the special javascript:encoding
d) A URL that uses the special javascript:stack
Answer:-b
505. What will be the output of the following JavaScript code snippet?

int a=1;
if(a!=null) // JavaScript not equal to Operators
return 1;
else
return 0;

a) 0
b) 1
c) compiler error
d) runtime error
Answer:-b
506. Which of the following object is the main entry point to all client-side JavaScript
features and APIs?
a) Position
b) Window
c) Standard
d) Location
Answer:-b
507. What will be the output of the following JavaScript program?

function sanfoundry(javascript)
{
return (javascript ? “yes” : “no”);
}
bool ans=true;
console.log(sanfoundry(ans));

a) Compilation error
b) Runtime error
c) Yes
d) No
Answer:-c
508. What will be the output of the following JavaScript code?

// Javascript code snippet to compare the height


function height()
{
var height = 123.56;
var type = (height>=190) ? "tall" : "short";
return type;
}

a) short
b) 123.56
c) tall
d) 190
Answer:-a
509. Which of the following can be used to call a JavaScript Code Snippet?
a) Function/Method
b) Preprocessor
c) Triggering Event
d) RMI
Answer:-a
510. What will be the output of the following JavaScript function?

<p id="demo"></p>
<script>
function javascript()
{
// javacript abs() method
document.getElementById("demo").innerHTML = Math.abs(-7.25);
}
</script>

a) -7.25
b) 7.25
c) -7
d) 7
Answer:-b
511. What will be the output of the following JavaScript code?

var a=5 , b=1


var obj = { a : 10 }
// with keyword in JavaScript
with(obj)
{
alert(b)
}

a) 1
b) 10
c) 5
d) Error
Answer:-a
512. Which of the following explains correctly what happens when a JavaScript program
is developed on a Unix Machine?
a) will work perfectly well on a Windows Machine
b) will be displayed as JavaScript text on the browser
c) will throw errors and exceptions
d) must be restricted to a Unix Machine only
Answer:-a
513. Which is a more efficient JavaScript code snippet?
Code 1 :

// for loop in javascript


for(var num=10;num>=1;num--)
{
document.writeln(num);
}

Code 2 :

var num=10;
while(num>=1)
{
document.writeln(num);
num++;
}

a) Code 1
b) Code 2
c) Both Code 1 and Code 2
d) Cannot Compare
Answer:-a
514. What will be the output of the following JavaScript code?

function printArray(a)
{
var len = a.length, i = 0;
if (len == 0)
console.log("Empty Array");
else
{
// do-while loop in javascript
do
{
console.log(a[i]);
} while (++i < len);
}
}

a) Prints “Empty Array”


b) Prints 0 to the length of the array
c) Prints the numbers in the array in order
d) Prints the numbers in the array in the reverse order
Answer:-c
515. What happens in the following JavaScript code snippet?

var js = 0;
while (js < 10)
{
console.log(js);
js++;
}

a) An exception is thrown
b) The values of js are logged or stored in a particular location or storage
c) The value of js from 0 to 9 is displayed in the console
d) An error is displayed
Answer:-c
516. What will be the output of the following JavaScript code?

function range(int javascript)


{
int a=5;
for(int i=0;i<javascript;i++)
{
console.log(a);
}
}
range(3);

a) 2
b) 5
c) 555
d) error
Answer:-c
517. Which of the following scoping type does JavaScript use?
a) Sequential
b) Segmental
c) Lexical
d) Literal
Answer:-c
518. What is the basic difference between JavaScript and Java?
a) Functions are considered as fields
b) Functions are values, and there is no hard distinction between methods and fields
c) Variables are specific
d) There is no difference
Answer:-b
519. What will be the output of the following JavaScript code?

var quiz=[1,2,3];
var js=[6,7,8];
var result=quiz.concat(js);
document.writeln(result);
a) 1, 2, 3, 6, 7, 8
b) 123
c) 1, 2, 3
d) Error
Answer:-a
520. Why JavaScript Engine is needed?
a) Both Compiling & Interpreting the JavaScript
b) Parsing the javascript
c) Interpreting the JavaScript
d) Compiling the JavaScript
Answer:-c
521. What will be the function of the following JavaScript program?

var scope = "js scope";


function checkscope()
{
var scope = "javascript scope";
function f()
{
return scope;
}
return f;
}

a) Returns the value in scope


b) Returns value null
c) Shows an error message
d) Returns exception
Answer:-a
522. What will be the output of the following JavaScript code?

int a=0;
for(a;a<5;a++);
console.log(a);

a) 4
b) 5
c) 0
d) error
Answer:-b
523. Which of the following methods/operation does javascript use instead of == and !=?
a) JavaScript uses equalto()
b) JavaScript uses equals() and notequals() instead
c) JavaScript uses bitwise checking
d) JavaScript uses === and !== instead
Answer:-d
524. What will be the result or type of error if p is not defined in the following JavaScript
code snippet?

console.log(p)

a) Value not found Error


b) Reference Error
c) Null
d) Zero
Answer:-b
525. What is the prototype represents in the following JavaScript code snippet?
function javascript() {};

a) Not valid
b) Prototype of a function
c) Function javascript
d) A custom constructor
Answer:-d
526. Why event handlers is needed in JS?
a) Allows JavaScript code to alter the behaviour of windows
b) Adds innerHTML page to the code
c) Change the server location
d) Performs handling of exceptions and occurrences
Answer:-a
527. Which of the following is not a framework?
a) JavaScript .NET
b) JavaScript
c) Cocoa JS
d) jQuery
Answer:-b
528. Which of the following is the property that is triggered in response to JS errors?
a) onclick
b) onerror
c) onmessage
d) onexception
Answer:-b
529. What will be the output of the following JavaScript code?

function compare()
{
int sanfoundry=1;
char javascript=1;
if(sanfoundry.tostring()===javascript)
return true;
else
return false;
}

a) runtime error
b) logical error
c) true
d) false
Answer:-c
530. What will be the firstname and surname of the following JavaScript program?

var book = {
"main title": "JavaScript",
'sub-title': "The Definitive Guide",
"for": "all audiences",
author: {
firstname: "David",
surname: "Flanagan"
}
};

a) objects
b) property names
c) properties
d) property values
Answer:-b
531. Which of the following is not an error in JavaScript?
a) Missing of Bracket
b) Division by zero
c) Syntax error
d) Missing of semicolons
Answer:-b
532. Consider the following JavaScript statement containing regular expressions and
check if the pattern matches.

var text = "testing: 1, 2, 3";


var pattern = /d+/g;

a) text.check(pattern)
b) pattern.test(text)
c) text==pattern
d) text.equals(pattern)
Answer:-b
533. The web development environment (JavaScript) offers which standard construct for
data validation of the input entered by the user.
a) Controlled loop constructs
b) Server page access
c) Client side Event
d) Permit server-side
Answer:-a
534. The main purpose of a “Live Wire” in NetScape is to ________
a) Create linkage between client side and server side
b) Permit server side, JavaScript code, to connect to RDBMS
c) Support only non relational database
d) To interpret JavaScript code
Answer:-b
535. The script tag must be placed in __________
a) the head tag
b) the head or body
c) the title or head
d) after the body tag
Answer:-b
536. A JavaScript program developed on a Unix Machine ________
a) will throw errors and exceptions
b) must be restricted to a Unix Machine only
c) will work perfectly well on a Windows Machine
d) will be displayed as a JavaScript text on the browser
Answer:-c
537. JavaScript is ideal to ________
a) make computations in HTML simpler
b) minimize storage requirements on the web server
c) increase the download time for the client
d) increase the loading time of the website
Answer:-b
538. Which attribute is used to specify that the script is executed when the page has
finished parsing? (only for external scripts)
a) parse
b) a sync
c) defer
d) type
Answer:-c
539. JavaScript Code can be called by using ____________
a) RMI
b) Triggering Event
c) Preprocessor
d) Function/Method
Answer:-d
540. JavaScript can be written __________
a) directly into JS file and included into HTML
b) directly on the server page
c) directly into HTML pages
d) directly into the css file
Answer:-a
541. Which of the following Attribute is used to include External JS code inside your
HTML Document?
a) src
b) ext
c) script
d) link
Answer:-a
542. A proper scripting language is a __________
a) High level programming language
b) Assembly level programming language
c) Machine level programming language
d) Low level programming language
Answer:-a
543. What will be the output of the following JavaScript code?

<p id="demo"></p>
var txt1 = "good";
var txt2 = "day";
document.getElementById("demo").innerHTML = txt1 + txt2;
a) good day
b) goodday
c) error
d) undefined
Answer:-b
544. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
var x = 5;
var y = 2;
var z = x % y;
document.getElementById("demo").innerHTML = z;
</script>
a) 0
b) 1
c) 2
d) 5
Answer:-b
545. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
var x = 10;
x *= 5;
document.getElementById("demo").innerHTML = x;
</script>
a) 5
b) 10
c) 50
d) Error
Answer:-c
546. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
txt1 = “ one”;
txt1 += “two”;
document.getElementById("demo").innerHTML = txt1;
</script>
a) onetwo
b) one two
c) error
d) undefined
Answer:-a
547. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = typeof "John"
</script>
a) integer
b) number
c) string
d) error
Answer:-c
548. JavaScript Code can be called by using ___________
a) RMI
b) Triggering Event
c) Preprocessor
d) Function/Method
Answer:-d
549. The type of a variable that is volatile is _______________
a) Volatile variable
b) Mutable variable
c) Immutable variable
d) Dynamic variable
Answer:-b
550. A hexadecimal literal begins with __________
a) 00
b) 0x
c) 0X
d) Both 0x and 0X
Answer:-d
551. The generalised syntax for a real number representation is __________
a) [digits][.digits][(E|e)[(+|-)]digits]
b) [digits][+digits][(E|e)[(+|-)]digits]
c) [digits][(E|e)[(+|-)]digits]
d) [.digits][digits][(E|e)[(+|-)]digits]
Answer:-a
552. JavaScript _________ when there is an indefinite or an infinite value during an
arithmetic computation.
a) Prints an exception error
b) Prints an overflow error
c) Displays “Infinity”
d) Prints the value as such
Answer:-c
553. Which of the following is not considered as an error in JavaScript?
a) Syntax error
b) Missing of semicolons
c) Division by zero
d) Missing of Bracket
Answer:-c
554. The escape sequence ‘\f’ stands for _________
a) Floating numbers
b) Representation of functions that returns a value
c) \f is not present in JavaScript
d) Form feed
Answer:-d
555. The snippet that has to be used to check if “a” is not equal to “null” is _________
a) if(a!=null)
b) if (!a)
c) if(a!null)
d) if(a!==null)
Answer:-d
556. The statement a===b refers to _________
a) Both a and b are equal in value, type and reference address
b) Both a and b are equal in value
c) Both a and b are equal in value and type
d) There is no such statement
Answer:-c
557. Assume that we have to convert “false” that is a non-string to string. The command
that we use is (without invoking the “new” operator).
a) false.toString()
b) String(false)
c) String newvariable=”false”
d) Both false.toString() and String(false)
Answer:-d
558. What will be the output of the following JavaScript code?

function compare()
{
int num=2;
char b=2;
if(a==b)
return true;
else
return false;
}
a) true
b) false
c) runtime error
d) compilation error
Answer:-a
559. What will be the output of the following JavaScript code?

function equalto()
{
let num=10;
if(num===”10”)
return true;
else
return false;
}
a) true
b) false
c) runtime error
d) compilation error
Answer:-b
560. What will be the output of the following JavaScript code?

function compare()
{
int a=1;
char b=1;
if(a.tostring()===b)
return true;
else
return false;
}
a) true
b) false
c) runtime error
d) logical error
Answer:-a
561. What will be the output of the following JavaScript code?

int a==2;
int b=4;
int ans=a+b;
print(ans);
a) 2
b) 6
c) 0
d) error
Answer:-d
562. What will be the output of the following JavaScript code?

int a=1;
if(a!=null)
return 1;
else
return 0;
a) 1
b) 0
c) runtime error
d) compiler error
Answer:-a
563. What will be the output of the following JavaScript code?

var string1 = ”123”;


var intvalue = 123;
alert( string1 + intvalue );
a) 123246
b) 246
c) 123123
d) Exception
Answer:-c
564. A function definition expression can be called as __________
a) Function prototype
b) Function literal
c) Function calling
d) Function declaration
Answer:-b
565. The property of a primary expression is ____________
a) stand-alone expressions
b) basic expressions containing all necessary functions
c) contains variable references alone
d) contains only keywords
Answer:-a
566. Consider the following JavaScript statements.

var text = "testing: 1, 2, 3"; // Sample text


var pattern = /\d+/g // Matches all instances of one or more digits
In order to check if the pattern matches with the string “text”, the statement is
____________
a) text==pattern
b) text.equals(pattern)
c) text.test(pattern)
d) pattern.test(text)
Answer:-d
567. The expression of calling (or executing) a function or method in JavaScript is called
________
a) Primary expression
b) Functional expression
c) Invocation expression
d) Property Access Expression
Answer:-c
568. What kind of expression is “new Point(2,3)”?
a) Primary Expression
b) Object Creation Expression
c) Invocation Expression
d) Constructor Calling Expression
Answer:-b
569. Which of the operator is used to test if a particular property exists or not?
a) in
b) exist
c) within
d) exists
Answer:-a
570. Among the following, which one is a ternary operator?
a) +
b) :
c) –
d) ?:
Answer:-d
571. “An expression that can legally appear on the left side of an assignment
expression.” is a well known explanation for variables, properties of objects, and
elements of arrays. They are called ___________
a) Properties
b) Prototypes
c) Lvalue
d) Definition
Answer:-c
572. What will be the equivalent output of the following JavaScript code snippet?

x = ~-y;
w = x = y = z;
q = a?b:c?d:e?f:g;
a)

x = ~(-y); w = (x = (y = z));
q = a?b:(c?d:(e?f:g));
b)

x = a?b:(c?d:(e?f:g));
q = ~(-y); w = (x = (y = z));
c)

x = (x = (y = z));w = ~(-y);
q = a?b:(c?d:(e?f:g));
d)

x = ~(-y); w = (x = (y = z));
q = (c?d:(e?f:g));
Answer:- a
573. What will be the output of the following JavaScript code?
function output(option)
{
return (option ? “yes” : “no”);
}
bool ans=true;
console.log(output(ans));
a) Yes
b) No
c) Runtime error
d) Compilation error
Answer:-a
574. What will be the output of the following JavaScript code?

var obj=
{
length:20,
height:35,
}
if (‘breadth' in obj === false)
{
obj.breadth = 12;
}

console.log(obj.breadth);
a) 20
b) 12
c) undefined
d) error
Answer:-b
575. What will be the output of the following JavaScript code?
function height()
{
var height = 123.56;
var type = (height>=190) ? "tall" : "short";
return type;
}
a) 123.56
b) 190
c) tall
d) short
Answer:-d
576. What will be the output of the following JavaScript code?

string a = ”hi”;
string b =”there”;
alert(a+b);
a) hi
b) there
c) hithere
d) undefined
Answer:-c
577. What will be the output of the following JavaScript code?

function output(object)
{
var place=object ? object.place : “Italy”;
return “clean:”+ place;
}
console.log(output({place:India}));
a) clean:India
b) clean:Italy
c) error
d) undefined
Answer:-a
578. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Math.abs(-7.25);
}
</script>
a) 7.25
b) -7.25
c) 7
d) -7
Answer:-a
579. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Math.cbrt(125);
}
</script>
a) 125
b) 25
c) 5
d) Error
Answer:-c
580. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Math.acos(0.5);
}
</script>
a) 1.01
b) 1.047
c) 1.00
d) 1.4
Answer:-b
581. JavaScript is a _______________ language.
a) Object-Oriented
b) High-level
c) Assembly-language
d) Object-Based
Answer:-d
582. What will be the output of the following JavaScript code?

var a=5 , b=1


var obj = { a : 10 }
with(obj)
{
alert(b)
}
a) 10
b) Error
c) 1
d) 5
Answer:-c
583. A conditional expression is also called a _______________
a) Alternative to if-else
b) Immediate if
c) If-then-else statement
d) Switch statement
Answer:-b
584. Which is a more efficient JavaScript code snippet?
Code 1 :

for(var num=10;num>=1;num--)
{
document.writeln(num);
}
Code 2 :

var num=10;
while(num>=1)
{
document.writeln(num);
num++;
}
a) Code 1
b) Code 2
c) Both Code 1 and Code 2
d) Cannot Compare
Answer:-a
585. What is a block statement in JavaScript?
a) conditional block
b) block that contains a single statement
c) both conditional block and a single statement
d) block that combines multiple statements into a single compound statement
Answer:-d
586. When an empty statement is encountered, a JavaScript interpreter __________
a) Ignores the statement
b) Prompts to complete the statement
c) Throws an error
d) Shows a warning
Answer:-a
587. The “var” and “function” are __________
a) Keywords
b) Declaration statements
c) Data types
d) Prototypes
Answer:-b
588. In the following switch syntax, the expression is compared with the case labels
using which of the following operator(s)?

switch(expression)
{
statements
}
a) ==
b) equals
c) equal
d) ===
Answer:-d
589. What happens in the following javaScript code snippet?

var count = 0;
while (count < 10)
{
console.log(count);
count++;
}
a) The values of count are logged or stored in a particular location or storage
b) The value of count from 0 to 9 is displayed in the console
c) An error is displayed
d) An exception is thrown
Answer:-b
590. The enumeration order becomes implementation dependent and non-interoperable
if ___________
a) If the object inherits enumerable properties
b) The object does not have the properties present in the integer array indices
c) The delete keyword is never used
d) Object.defineProperty() is not used
Answer:-a
591. What will be the output of the following JavaScript code?

Int a=1;
if(a>10)
{
document.write(10);
}
else
{
document.write(a);
}
a) 10
b) 0
c) 1
d) Undefined
Answer:-c
592. What will be the output of the following JavaScript code?

var grade='B';
var result;
switch(grade)
{
case 'A':
{
result+="10";
break;
}
case 'B':
{
result+=" 9";
break;
}
case 'C':
{
result+=" 8";
break;
}
default:
result+=" 0";
}
document.write(result);
a) 10
b) 9
c) 8
d) 0
Answer:-b
593. What will be the output of the following JavaScript code?

var grade='A';
var result;
switch(grade)
{
case 'A':
result+="10";
case 'B':
result+=" 9";
case 'C':
result+=" 8";
default:
result+=" 0";
}
document.write(result);
a) 10
b) 27
c) 8
d) 0
Answer:-b
594. What will be the output of the following JavaScript code?

int a=4;
int b=1;
int c=0;
If(a==b)
document.write(a);
else if(a==c)
document.write(a);
else
document.write(c);
a) 4
b) 1
c) Error
d) 0
Answer:-d
595. What will be the output of the following JavaScript code?

var grade='E';
var result;
switch(grade)
{
case 'A':
result+="10";
case 'B':
result+=" 9";
case 'C':
result+=" 8";
default:
result+=" 0";
}
document.write(result);
a) 10
b) 0
c) 18
d) 17
Answer:-b
596. What will be the output of the following JavaScript code?

function printArray(a)
{
var len = a.length, i = 0;
if (len == 0)
console.log("Empty Array");
else
{
do
{
console.log(a[i]);
} while (++i < len);
}
}
a) Prints the numbers in the array in order
b) Prints the numbers in the array in the reverse order
c) Prints 0 to the length of the array
d) Prints “Empty Array”
Answer:-a
597. What are the three important manipulations done in a for loop on a loop variable?
a) Updation, Incrementation, Initialization
b) Initialization,Testing, Updation
c) Testing, Updation, Testing
d) Initialization,Testing, Incrementation
Answer:-b
598. What will the following JavaScript code snippet work? If not, what will be the error?

function tail(o)
{
for (; o.next; o = o.next) ;
return o;
}
a) No, this will throw an exception as only numerics can be used in a for loop
b) No, this will not iterate
c) Yes, this will work
d) No, this will result in a runtime error with the message “Cannot use Linked List”
Answer:-c
599. What will be the equivalent code of the following JavaScript code?

for(var p in o)
console.log(o[p]);
a)

for (var i = 0;i < a.length;i++)

console.log(a[i]);

b)

for (int i = 0;i < a.length;i++)

console.log(a[i]);

c)

for (var i = 0;i <= a.length;i++)

console.log(a[i]);

d)

for (var i = 1;i < a.length;i++)

console.log(a[i]);
Answer:-a

600. One of the special features of an interpreter in reference with the for loop is that
___________
a) Before each iteration, the interpreter evaluates the variable expression and assigns
the name of the property
b) The iterations can be infinite when an interpreter is used
c) The body of the loop is executed only once
d) the iteration is finite when an interpreter is used
Answer:-a
601. What will happen if the body of a for/in loop deletes a property that has not yet been
enumerated?
a) The property will be stored in a cache
b) The loop will not run
c) That property will not be enumerated
d) The property will be enumerated
Answer:-c
602. What will be the step of the interpreter in a jump statement when an exception is
thrown?
a) The interpreter stops its work
b) The interpreter throws another exception
c) The interpreter jumps to the nearest enclosing exception handler
d) The interpreter throws an error
Answer:-c
603. What will be the role of the continue keyword in the following JavaScript code
snippet?
while (a != 0)
{
if (a == 1)
continue;
else
a++;
}
a) The continue keyword restarts the loop
b) The continue keyword skips the next iteration
c) The continue keyword skips the rest of the statements in that iteration
d) The continue keyword breaks out of the loop
Answer:-c
604. What could be the task of the statement debugger in the following JavaScript code?

function f(o)
{
if (o === undefined) debugger;
}
a) It does nothing but a simple breakpoint
b) It debugs the error in that statement and restarts the statement's execution
c) It is used as a keyword that debugs the entire program at once
d) It is used to find error in the statement
Answer:-a
605. Among the keywords below, which one is not a statement?
a) debugger
b) with
c) if
d) use strict
Answer:-d
606. What will be the output of the following JavaScript code?

function range(int length)


{
int a=5;
for(int i=0;i<length;i++)
{
console.log(a);
}
}
range(3);
a) 5
b) 555
c) 3
d) error
Answer:-b
607. What will be the output of the following JavaScript code?

var a = 10;
do {
a += 1;
console.log(a);
} while (a < 5);
a) 11121314
b) 1112
c) 12345
d) 11
Answer:-d
608. What will be the output of the following JavaScript code?

var a= 0;
var b = 0;
while (a < 3)
{
a++;
b += a;
console.log(b);
}
a) 135
b) 123
c) 013
d) 01
Answer:-a
609. What will be the output of the following JavaScript code?

int size=5;
int a=5;
int size=4;
for(int j=size;j>=0;j--)
{
console.log(a);
a=a-2;
}
a) 5555
b) 5321
c) 531-1
d) 531
Answer:-c
610-. What will be the output of the following JavaScript code?

int a=0;
for(a;a<5;a++);
console.log(a);
a) 0
b) error
c) 4
d) 5
Answer:-d
611. The unordered collection of properties, each of which has a name and a value is
called _________
a) String
b) Object
c) Serialized Object
d) Array
Answer:-b
612. The object has three object attributes namely ________
a) Class, parameters, object’s extensible flag
b) Prototype, class, objects’ parameters
c) Prototype, class, object’s extensible flag
d) Native object, Classes and Interfaces and Object’s extensible flag
Answer:-c
613. What will be the firstname and surname of the following JavaScript code?

var book = {
"main title": "JavaScript",
'sub-title': "The Definitive Guide",
"for": "all audiences",
author: {
firstname: "David",
surname: "Flanagan"
}
};
a) properties
b) property values
c) property names
d) objects
Answer:-c
614. A linkage of series of prototype objects is called as ________
a) prototype stack
b) prototype chain
c) prototype class
d) prototypes
Answer:-b
615. In the following syntax, the data type within the square brackets must be
___________

book[datatype]=assignment_value;
a) An integer
b) A String
c) An object
d) Floating point
Answer:-b
616. To determine whether one object is the prototype of (or is part of the prototype
chain of) another object, one should use the ____________
a) isPrototypeOf() method
b) equals() method
c) === operator
d) ==opertor
Answer:-a
617. What is the prototype represents in the following JavaScript code snippet?

function f() {};


a) Function f
b) A custom constructor
c) Prototype of a function
d) Not valid
Answer:-b
618. The purpose of extensible attribute is to __________
a) make all of the own properties of that object non configurable
b) to configure and bring a writable property
c) “lock down” objects into a known state and prevent outside tampering
d) to include new properties into the object
Answer:-c
619. Identify the process done in the following JavaScript code snippet?

o = {x:1, y:{z:[false,null,""]}};
s = JSON.stringify(o);
p = JSON.parse(s);
a) Object Encapsulation
b) Object Serialization
c) Object Abstraction
d) Object Encoding
Answer:-b
620. The basic purpose of the toLocaleString() is to _________
a) return a localised object representation
b) return a parsed string
c) return a local time in the string format
d) return a localized string representation of the object
Answer:-d
621. What will be the output of the following JavaScript code?

const object1 = {};


a = Symbol('a');
b = Symbol.for('b');
object1[a] = 'harry';
object1[b] = 'derry';
const objectSymbols = Object.getOwnPropertySymbols(object1);
console.log(objectSymbols.length);
a) 0
b) 2
c) 1
d) Error
Answer:-b
622. What will be the output of the following JavaScript code?

const obj1 =
{
property1: 21
}
const descriptor1 = Object.getOwnPropertyDescriptor(obj1, 'property1');
console.log(descriptor1.configurable);
console.log(descriptor1.enumerable);
a) true 21
b) true false
c) true true
d) false false
Answer:-c
623. What will be the output of the following JavaScript code?

const obj1 = { property1: '10'};


const obj2 = Object.freeze(obj1);
obj2.property1 = '20';
console.log(obj2.property1);
a) 10
b) 20
c) Runtime error
d) Compilation error
Answer:-a
624. What will be the output of the following JavaScript code?

const object1 = {
property1: 20
};
console.log(Object.is(object1));
a) 20
b) true
c) false
d) error
Answer:-c
625. What will be the output of the following JavaScript code?

const obj = {prop: 12};


Object.preventExtensions(obj);
console.log( Object.isExtensible(obj));
a) 12
b) false
c) true
d) error
Answer:-b
626. What is the observation made in the following JavaScript code?

var count = [1,,3];


a) The omitted value takes “undefined”
b) This results in an error
c) This results in an exception
d) The omitted value takes an integer value
Answer:-a
627. What will be the output of the following JavaScript code?

var a1 = [,,,];
var a2 = new Array(3);
0 in a1
0 in a2
a) true false
b) false true
c) true true
d) false true
Answer:-a
628. The pop() method of the array does which of the following task?
a) decrements the total length by 1
b) increments the total length by 1
c) prints the first element but no effect on the length
d) updates the element
Answer:-a
629. What is the observation made in the following JavaScript code?

if (!a[i]) continue;
a) Skips the defined elements
b) Skips the existent elements
c) Skips the null elements
d) Skips the defined & existent elements
Answer:-c
630. What will happen if reverse() and join() methods are used simultaneously?
a) Reverses and stores in the same array
b) Reverses and concatenates the elements of the array
c) Reverses
d) Stores the elements of an array in normal order
Answer:-a
631. What will be the possible output of the following JavaScript code?

var a = [1,2,3,4,5];
a.slice(0,3);
a) Returns [1,2,3]
b) Returns [4,5]
c) Returns [1,2,3,4]
d) Returns [1,2,3,4,5]
Answer:-a
632. What will be the shift() output of the following JavaScript code?

var a = [];
a.unshift(1);
a.unshift(22);
a.shift();
a.unshift(3,[4,5]);
a.shift();
a.shift();
var output = a.shift();
document.writeln(output);
a) 1
b) [4,5]
c) [3,4,5]
d) Exception is thrown
Answer:-a
633. The primary purpose of the array map() function is that it __________
a) maps the elements of another array into itself
b) passes each element of the array and returns the necessary mapped elements
c) passes each element of the array on which it is invoked to the function you specify,
and returns an array containing the values returned by that function
d) pass the elements of the array into another array
Answer:-c
634. The reduce and reduceRight methods follow a common operation called
__________
a) filter and fold
b) inject and fold
c) finger and fold
d) fold
Answer:-b
635. The method or operator used to identify the array is __________
a) isarrayType()
b) ==
c) ===
d) typeof
Answer:-d
636. What will be the output of the following JavaScript code?

var val1=[1,2,3];
var val2=[6,7,8];
var result=val1.concat(val2);
document.writeln(result);
a) 1, 2, 3
b) Error
c) 1, 2, 3, 6, 7, 8
d) 123
Answer:-c
637. What will be the output of the following JavaScript code?

var values=[1,2,3,4]
var ans=values.slice(1);
document.writeln(ans);
a) 1, 2, 3, 4
b) 2, 3, 4
c) 1, 3, 4
d) error
Answer:-b
638. What will be the output of the following JavaScript code?

int sum=0;

var arr = [10,15,20,30];

arr.forEach(function myFunction(element)
{
sum= sum+element;
});
document.writeln(sum);
a) 70
b) 75
c) 10
d) error
Answer:-b
639. What will be the output of the following JavaScript code?

var values=["one","two","Three"];
var ans=values.shift();
document.writeln(ans);
a) one
b) two
c) three
d) error
Answer:-a
640. What will be the output of the following JavaScript code?

var arr=[1,2,3];
var rev=arr.reverse();
document.writeln(rev);
a) 1, 2, 3
b) 3, 2, 1
c) 3
d) 1
Answer:-b
641. The function definitions in JavaScript begins with _____________
a) Identifier and Parentheses
b) Return type and Identifier
c) Return type, Function keyword, Identifier and Parentheses
d) Identifier and Return type
Answer:-c
642. What will be the output of the following JavaScript code?

function printprops(o)
{
for(var p in o)
console.log(p + ": " + o[p] + "\n");
}
a) Prints the contents of each property of o
b) Returns undefined
c) Prints only one property
d) Prints the address of elements
Answer:-b
643. When does the function name become optional in JavaScript?
a) When the function is defined as a looping statement
b) When the function is defined as expressions
c) When the function is predefined
d) when the function is called
Answer:-b

644. What is the purpose of a return statement in a function?


a) Returns the value and continues executing rest of the statements, if any
b) Returns the value and stops the program
c) Returns the value and stops executing the function
d) Stops executing the function and returns the value
Answer:-d

645. What will happen if a return statement does not have an associated expression?
a) It returns the value 0
b) It will throw an exception
c) It returns the undefined value
d) It will throw an error
Answer:-c
646. A function with no return value is called ___________
a) Procedures
b) Method
c) Static function
d) Dynamic function
Answer:-a
647. The function stops its execution when it encounters?
a) continue statement
b) break statement
c) goto statement
d) return statement
Answer:-d
648. Which keyword is used to define the function in javascript?
a) void
b) int
c) function
d) main
Answer:-c
649. Which is an equivalent code to invoke a function m of class o that expects two
arguments x and y?
a) o(x,y);
b) o.m(x) && o.m(y);
c) m(x,y);
d) o.m(x,y);
Answer:-d
650. What will be the equivalent code of the following JavaScript code?

o.m(x,y);
a) o.m(x) && o.m(y);
b) o[“m”](x,y);
c) o(m)[“x”,”y”];
d) o.m(x && y);
Answer:-b
651. What will be the output of the following JavaScript code?

function info()
{
int a=1;
int b=2;
return a*b;
}
document.write(info());
a) 1
b) 2
c) 3
d) error
Answer:-b
652. What will be the output of the following JavaScript code?

var arr = [7, 5, 9, 1];


var value = Math.max.apply(null, arr);
document.writeln(value);
a) 7
b) 5
c) 1
d) 9
Answer:-d
653. What will be the output of the following JavaScript code?
var person =
{
name: “Rahul”,
getName: function()
{
nreturn this.name;
}
}
var unboundName = person.getName;
var boundName = unboundName.bind(person);
document.writeln(boundName());
a) runtime error;
b) compilation error
c) Rahul
d) undefined
Answer:-c
654. What will be the output of the following JavaScript code?

function code(id,name)
{
this.id = id;
this.name = name;
}
function pcode(id,name)
{
code.call(this,id,name);
}
document.writeln(new pcode(101,"vivek").id);
a) vivek
b) 101
c) Runtime error
d) Compilation error
Answer:-b
655. What will be the output of the following JavaScript code?

var pow=new Function("num1","num2","return Math.pow(num1,num2)");


document.writeln(pow(2,3));
a) 2
b) 3
c) 8
d) error
Answer:-c
656. What will be the output of the following JavaScript statement?

var grand_Total=eval("10*10+5");
a) 10*10+5
b) 105 as a string
c) 105 as an integer value
d) Exception is thrown
Answer:-c
657. Do functions in JavaScript necessarily return a value?
a) It is mandatory
b) Not necessary
c) Few functions return values by default
d) some functions do not return any value
Answer:-c
658. Will the following JavaScript code work?
var tensquared = (function(x) {return x*x;}(10));

a) Yes, perfectly
b) Error
c) Exception will be thrown
d) Memory leak
Answer:-a
659. What will be the output of the following JavaScript code?

var string2Num=parseInt("123xyz");
a) 123
b) 123xyz
c) Exception
d) NaN
Answer:-a
660. The one-liner code that concatenates all strings passed into a function is
____________
a)

function concatenate()
{
return String.prototype.concat('', arguments);
}
b)

function concatenate()
{
return String.prototype.apply('', arguments);
}
c)

function concatenate()
{
return String.concat.apply('', arguments);
}
d)

function concatenate()
{
return String.prototype.concat.apply('', arguments);
}
Answer:- d

661. If you have a function f and an object o, you can define a method named m of o
with ________
a) o.m=m.f;
b) o.m=f;
c) o=f.m;
d) o=f;
Answer:-b
662. What will be the equivalent statement of the following JavaScript statement?

var o = new Object();


a) var o = Object();
b) var o;
c) var o= new Object;
d) Object o=new Object();
Answer:-c
663. What is the difference between the two lines in the following JavaScript code?

!!(obj1 && obj2);


(obj1 && obj2);
a) Both the lines result in a boolean value “True”
b) Both the lines result in a boolean value “False”
c) Both the lines check just for the existence of the object alone
d) The first line results in a real boolean value whereas the second line merely checks
for the existence of the objects
Answer:-d
664. What will be the state stored in d in the following JavaScript code?

var c = counter(), d = counter();


c.count()
d.count()
c.reset()
c.count()
d.count()
a) 1
b) 0
c) Null
d) Undefined
Answer:-a
665. What will be the last statement return in the following JavaScript code?

function constfuncs()
{
var funcs = [];
for(var i = 0; i < 10; i++)
funcs[i] = function() { return i; };
return funcs;
}
var funcs = constfuncs();
funcs[5]()
a) 9
b) 0
c) 10
d) 12
Answer:-c
666. What will be the output of the following JavaScript code?

var arr = [7, 5, 9, 1];


var min = Math.min.apply(null, arr);
document.writeln(min);
a) 7
b) 5
c) 1
d) 9
Answer:-c
667. What will be the output of the following JavaScript code?

var add=new Function("num1","num2","return num1+num2");


document.writeln(add(2,5));
a) 2
b) 5
c) Error
d) 7
Answer:-d
668. What will be the output of the following JavaScript code?

var a=3.7;
var b=2;
a=ciel(a)
document.writeIn(a*b);
a) 6
b) 7.4
c) 7.5
d) 8
Answer:-d
669. What will be the output of the following JavaScript code?

var a=2.99;
var ans=floor(a)*floor(a)
console.log(ans);
a) 9
b) 8.31
c) Error
d) 4
Answer:-d
670. What will be the output of the following JavaScript code?

var a=225;
document.writeln(Math.sqrt(a));
a) 225
b) 15
c) Error
d) Undefined
Answer:-b
671. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Math.asinh(1);
}
</script>
a) 0.80
b) 0.88
c) 0.50
d) 0.78
Answer:-b
672. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Math.atan2(8, 4);
}
</script>
a) 1.00
b) 1.01
c) 1.05
d) 1.10
Answer:-d
673. What kind of scoping does JavaScript use?
a) Literal
b) Lexical
c) Segmental
d) Sequential
Answer:-b
674. What must be done in order to implement Lexical Scoping?
a) Get the object
b) Dereference the current scope chain
c) Reference the current scope chain
d) Return the value
Answer:-c
675. What is closure?
a) Function objects
b) Scope where function’s variables are resolved
c) Both Function objects and Scope where function’s variables are resolved
d) Function return value
Answer:-c
675. Which of the following is not an example of closures?
a) Objects
b) Variables
c) Functions
d) Graphics
Answer:-d
676. Which of the following uses a lot of CPU cycles?
a) GUI
b) Statically generated graphics
c) Dynamically generated graphics
d) Generic scoping
Answer:-c
677. What will be the function of the following JavaScript code?

var scope = "global scope";


function checkscope()
{
var scope = "local scope";
function f()
{
return scope;
}
return f;
}
a) Returns value null
b) Returns exception
c) Returns the value in scope
d) Shows an error message
Answer:-c
678. What is the fundamental rule of lexical scoping?
a) Functions are declared in the scope
b) Functions are executed using scope chain
c) Functions are declared outside the scope
d) Variables are declared within the function
Answer:-b
679. What is the opposite approach to the lexical scoping?
a) Literal scoping
b) Static scoping
c) Dynamic scoping
d) Generic scoping
Answer:-c
680. What is the purpose of the dynamic scoping?
a) Variables can be declared outside the scope
b) Variables must be declared outside the scope
c) Variables cannot be declared outside the scope
d) Variable cannot be declared within the function
Answer:-a
681. Which of the algorithmic languages is not lexical scoping standardized in?
a) Ada
b) Pascal
c) Modula2
d) Html
Answer:-d
682. The behaviour of the instances present of a class inside a method is defined by
__________
a) Method
b) Classes
c) Interfaces
d) Classes and Interfaces
Answer:-b
683. The keyword or the property that you use to refer to an object through which they
were invoked is _________
a) from
b) to
c) this
d) object
Answer:-c
684. What will be the output of the following JavaScript code?

var o = new F();


o.constructor === F
a) false
b) true
c) 0
d) 1
Answer:-b
685. The basic difference between JavaScript and Java is _________
a) There is no difference
b) Functions are considered as fields
c) Variables are specific
d) Functions are values, and there is no hard distinction between methods and fields
Answer:-d
686. The meaning for Augmenting classes is that ___________
a) objects inherit prototype properties even in a dynamic state
b) objects inherit prototype properties only in a dynamic state
c) objects inherit prototype properties in the static state
d) object doesn’t inherit prototype properties in the static state
Answer:-a
687. The property of JSON() method is __________
a) it can be invoked manually as object.JSON()
b) it will be automatically invoked by the compiler
c) it is invoked automatically by the JSON.stringify() method
d) it cannot be invoked in any form
Answer:-c
688. When a class B can extend another class A, we say that?
a) A is the superclass and B is the subclass
b) B is the superclass and A is the subclass
c) Both A and B are the superclass
d) Both A and B are the subclass
Answer:-a
689. If A is the superclass and B is the subclass, then subclass inheriting the superclass
can be represented as _________
a) B=inherit(A);
b) B=A.inherit();
c) B.prototype=inherit(A);
d) B.prototype=inherit(A.prototype);
Answer:-c
690. The snippet that filters the filtered set is __________
a) var t=new FilteredSet(s, {function(s) {return !(x instanceof Set);});
b) var t=new FilteredSet{function(s) {return !(x instanceof Set);});
c) var t=new FilteredSet(s, {function(s) {return (x instanceof Set);});
d) var t=new FilteredSet(s, {function(s) {return x;});
Answer:-a
691. The method that can be used to create new properties and also to modify the
attributes of existing properties is _________
a) Object.defineProperty()
b) Object.defineProperties()
c) Both Object.defineProperty() and Object.defineProperties()
d) Object.inherit()
Answer:-c
692. What will be the output of the following JavaScript code?

const obj1 =
{
a: 10,
b: 15,
c: 18
};
const obj2 = Object.assign({c: 7, d: 1}, obj1);
console.log(obj2.c, obj2.d);
a) 7,1
b) 18,1
c) Undefined
d) Error
Answer:-a
693. What will be the output of the following JavaScript code?

function person()
{
this.name = 'rahul';
}
function obj()
{
obj.call(this)
}
obj.prototype = Object.create(person.prototype);
const app = new obj();
console.log(app.name);
a) undefined
b) runtime error
c) compilation error
d) rahul
Answer:-d
694. What will be the output of the following JavaScript code?

const object1 = {};


Object.defineProperties(object1,
{
property1:
{
value: 10
}
});
console.log(object1.property1);
a) 0
b) 10
c) undefined
d) error
Answer:-b
695. What will be the output of the following JavaScript code?

const prototype1 = {};


const object1 = Object.create(prototype1);
console.log(Object.getPrototypeOf(object1) === prototype1);
a) true
b) false
c) error
d) 0
Answer:-a
696. What will be the output of the following JavaScript code?

const obj1 = {
property1: 2
};
Object.seal(object1);
obj1.property1 =4;
console.log(obj1.property1);
delete obj1.property1;
a) 2
b) 4
c) Error
d) Undefined
Answer:-c
697. The four kinds of class members are ________
a) Instance methods, Instance fields, Static method, Dynamic method
b) Instance fields, Instance methods, Class fields, Class methods
c) Instance fields, Non-instance fields, Dynamic methods, Global methods
d) Global methods, Local methods, Dynamic methods, Static methods
Answer:-b
698. Different kinds of the object involved in a class definition are ________
a) Public object, Private object, Protected object
b) Constructor object, Function object, Destructor object
c) Constructor object, Prototype object, Instance object
d) Instance method, Static object, Dynamic object
Answer:-c
699. The object whose properties are inherited by all instances of the class, and
properties whose values are functions behaving like instance methods of the class, is
________
a) Instance object
b) Constructor object
c) Destructor object
d) Prototype object
Answer:-d
700. Which variables are used internally in object methods and are also globally visible?
a) Object properties
b) Variable properties
c) Method properties
d) Internal properties
Answer:-b
701. The class that represents the regular expressions is ________
a) RegExpObj
b) RegExpClass
c) RegExp
d) StringExp
Answer:-c
702. The different variant of Date() constructor to create date object is/are ___________
i. new Date(date)
ii. new Date(milliseconds)
iii. new Date(date string)
iv. new Date(year, month, date[hour, minute, second, millisecond])
a) i, ii and iii only
b) ii, iii and iv only
c) i, ii and iv only
d) i, ii, iii and iv
Answer:-b
703. Which is the correct code that returns a complex number that is the complex
conjugate of this one?
a) Complex.prototype.conj = function() { return new Complex(this.r, -this.i); };
b) Complex.prototype.conj = function() { return Complex(this.r, -this.i); };
c) Complex.prototype.conj = function() { return (this.r, -this.i); };
d) Complex.prototype.conj = function() { new Complex(this.r, -this.i); };
Answer:-a
704. How can we make methods available on all objects?
a) Object.add(methods)
b) Object.methods(add)
c) Object.add.methods(…)
d) Object.prototype
Answer:-d
705. What is the procedure to add methods to HTMLElement so that they will be
inherited by the objects that represent the HTML tags in the current document?
a) HTMLElement.prototype(…)
b) HTMLElement.prototype
c) HTML.addmethods()
d) HTML.elements(add)
Answer:-b
706. You can refresh the webpage in JavaScript by using ________
a) window.reload
b) location.reload
c) window.refresh
d) page.refresh
Answer:-b
707. What will be the output of the following JavaScript code?

emp={id:102,name:"Shyam Kumar",salary:40000}
document.write(emp.id+" "+emp.name+" "+emp.salary);
a) 102 4000 Shyam Kumar
b) 102 4000
c) 102 Shyam Kumar 40000
d) 102 shyam kumar 40000
Answer:-b
708. What will be the output of the following JavaScript code?

function emp(id,name)
{
this.id=id;
this.name=name;
}
e=new emp(103,"Vimal Jaiswal");

document.write(e.id+" "+e.name");
a) 103 vimal jaiswal
b) 103
c) 103 Vimal Jaiswal
d) Vimal jaiswal
Answer:-c
709. What will be the output of the following JavaScript code?

var emp=new Object();


emp.name="Ravi Malik";
emp.salary=50000;
document.write("emp.name+" "+emp.salary);
a) Ravi malik 5000
b) Ravi Malik 50000
c) Ravi malik
d) 50000
Answer:-b
710. What will be the output of the following JavaScript code?

function emp(name,salary)
{
this.name=name;
this.salary=salary;

this.changeSalary=changeSalary;
function changeSalary(otherSalary)
{
this.salary=otherSalary;
}
}
e=new emp("Rahul",30000);
e.changeSalary(45000);
document.write("e.name+" "+e.salary);
a) Rahul 30000
b) Rahul
c) Rahul 45000
d) 45000
Answer:-c
711. What will be the output of the following JavaScript code?

const obj = { 10: 'arry', 21: 'barry', 23: 'carry' };


console.log(Object.entries(obj)[2]);
a) [“arry”, “10”]
b) [“10”,”arry”]
c) [“21”,barry”]
d) [“23”,”carry”]
Answer:-d
712. The functions provide() and require() of Dojo toolkit and Google’s Closure library
are used for ___________
a) declaring and loading modules
b) declaring functions
c) declaring modules
d) loading modules
Answer:-a
713. The maximum number of global symbols a module can define is ____________
a) 2
b) 3
c) 1
d) 4
Answer:-c
714. To define each of the set classes as a property of the sets object (namespace) for
the module, the statement is
a) sets = sets.AbstractEnumerableSet.extend();
b) sets.SingletonSet = sets.AbstractEnumerableSet.extend(…);
c) sets.SingletonSet = sets.extend(…);
d) sets = sets.extend(…);
Answer:-b
715. What will be the efficiency quotient of the following JavaScript statements?

var Set = sets.Set;


var s = new Set(1,2,3);
a) The programmer imports at once the frequently used values into the global
namespace
b) There is no efficiency quotient, the programmer tries to make it inefficient
c) The programmer needs to import the Sets everytime he wants to use it
d) the programmer imports the set everytime the statement is encountered
Answer:-a
716. The scope of a function is also called as ________
a) Predefined function
b) Module function
c) Public function
d) Private function
Answer:-b
717. Modules that have more than one item in their API can ________
a) Assign itself to a global variable
b) Invoke another module of the same kind
c) Return a namespace object
d) Invoke another module of the same kind
Answer:-c
718. The provides() function and the exportsobject are used to _________
a) Register the module’s API and Store their API
b) Call the modules api
c) Store the module’s API
d) Register the modules api
Answer:-a
719. What could be achieved by running the JavaScript code snippet below?

var sets = com.davidflanagan.collections.sets;


a) Importing a single module
b) Importing a module partially
c) Importing a namespace
d) Importing the entire module
Answer:-d
720. The properties() method is a ________
a) Enumerable method
b) Non-enumerable method
c) Operational method
d) calling method
Answer:-b
721. What can be done in order to avoid the creation of global variables in JavaScript?
a) To use a method that defines all the variables
b) To use an object that has the reference to all the variables
c) To use an object as its namespace
d) To use global functions
Answer:-c
722. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
var x = 123e5;
document.getElementById("demo").innerHTML = x ;
</script>
a) 0.0123
b) 12300
c) Error
d) Undefined
Answer:-b
723. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
var res = "";
res = res + Number.isFinite(5-2) ;
document.getElementById("demo").innerHTML = res;
}
</script>
a) 3
b) true
c) false
d) error
Answer:-b
724. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
var res = "";
res = res + Number.isFinite(0 / 0);
document.getElementById("demo").innerHTML = res;
}
</script>
a) 3
b) true
c) false
d) error
Answer:-c
725. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
var res = "";
res = res + Number.isInteger('123');
document.getElementById("demo").innerHTML = res;
}
</script>
a) True
b) False
c) Error
d) Undefined
Answer:-b
726. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
var res = "";
res = res + Number.isInteger(0.5) + ": 0.5<br>";
document.getElementById("demo").innerHTML = res;
}
</script>
a) true
b) false
c) error
d) undefined
Answer:-b
727. The ‘$’ present in the RegExp object is called a ____________
a) character
b) matcher
c) metacharacter
d) metadata
Answer:-c
728. Consider the following JavaScript statement containing regular expressions and
check if the pattern matches?

var text = "testing: 1, 2, 3";


var pattern = /d+/g;
a) text==pattern
b) text.equals(pattern)
c) text.test(pattern)
d) pattern.test(text)
Answer:-d
729. The regular expression to match any one character not between the brackets is
__________
a) […]
b) [^]
c) [^…]
d) [\D]
Answer:-c
730. What does /[^(]* regular expression indicate?
a) Match one or more characters that are not open parenthesis
b) Match zero or more characters that are open parenthesis
c) Match zero or more characters that are not open parenthesis
d) Match one or more characters that are open parenthesis
Answer:-c
731. What will be the result when non greedy repetition is used on the pattern /a+?b/?
a) Matches the letter b preceded by the fewest number of a’s possible
b) Matches the letter b preceded by any number of a
c) Matches letter a preceded by letter b, in the stack order
d) Matches letter a present in the string
Answer:-a
732. What does the subexpression /java(script)?/ result in?
a) It matches “java” followed by the optional “script”
b) It matches “java” followed by any number of “script”
c) It matches “java” followed by a minimum of one “script”
d) It matches “java” followed by a single “script”
Answer:-a
733. What is the most essential purpose of parentheses in regular expressions?
a) Define pattern matching techniques
b) Define subpatterns within the complete pattern
c) Define portion of strings in the regular expression
d) matching the complete string
Answer:-b
734. The method that performs the search-and-replace operation to strings for pattern
matching is _______
a) searchandreplace()
b) add()
c) edit()
d) replace()
Answer:-d
735. What would be the result of the following statement in JavaScript using regular
expression methods?
a) Returns [“123″”456″”789”]
b) Returns [“123″,”456″,”789”]
c) Returns [1,2,3,4,5,6,7,8,9]
d) Throws an exception
Answer:-b
736. What will be the purpose of exec() in the following JavaScript code?

var pattern = /Java/g;


var text = "JavaScript is more fun than Java!";
var result;
while ((result = pattern.exec(text)) != null)
{
alert("Matched '" + result[0] + "'" +" at position " + result.index
+";
next search begins at " + pattern.lastIndex);
}
a) Returns the same kind of array whether or not the regular expression has the global g
flag
b) Returns different arrays in the different turns of iterations
c) Return a sub part of the array
d) Returns a null value
Answer:-a
737. What will be the output of the following JavaScript code?

console.log(Pattern.matches("[amn]", "abcd"));
a) true
b) false
c) undefined
d) a
Answer:-b
738. What will be the output of the following JavaScript code?

console.log(Pattern.matches("[amn]?", "a"));
a) true
b) false
c) undefined
d) bcd
Answer:-a
739. What will be the output of the following JavaScript code?

console.log(Pattern.matches("\\d", "1"));
a) true
b) false
c) undefined
d) 1
Answer:-a
740. What will be the output of the following JavaScript code?

Console.log(Pattern.matches("[adf]+", "a"));
a) true
b) false
c) undefined
d) 0
Answer:-a
741. What will be the output of the following JavaScript code?

console.log(Pattern.matches("[^abc]", "aemngq"));
a) true
b) false
c) undefined
d) 1
Answer:-b
742. The Crockford’s subset does not include which function in JavaScript?
a) eval()
b) coeval()
c) equal()
d) equivalent()
Answer:-a
743. What does javascript use instead of == and !=?
a) It uses bitwise checking
b) It uses === and !== instead
c) It uses equals() and notequals() instead
d) It uses equalto()
Answer:-b
744. What is being imposed on each subset to ensure that it conforms to the subset?
a) A parser to parse the code
b) A parser that parses and adds to the subset
c) A static verifier that parses code
d) A predefined function to parse the code
Answer:-c
745. Why was “The Good Parts” designed as a language subset in JavaScript?
a) To improve programmer flexibility
b) To balance the workload of the programmer
c) To create an in-built compiler and interpreter
d) To improve programmer productivity
Answer:-d
746. Which is the subset that is a secure container designed for the purpose of safely
running untrusted JavaScript?
a) Sandbox
b) The Good Parts
c) Both Sandbox and Good Parts
d) Web browser
Answer:- a
747. Why is this keyword not preferred in JavaScript?
a) Highly memory consuming
b) Functions should access the global objects
c) Functions should not access the global objects
d) Very inefficient to use
Answer:-c
748. Which are the two functions that are not allowed in any secure subset?
a) evaluate() and restrict()
b) eval() and the Function() constructor
c) debugger() and test()
d) eval() and debugger()
Answer:-b
749. Which is the object that defines methods that allow complete control over page
content?
a) The client-side document object
b) The server-side document object
c) Both client-side and server-side document object
d) Web document object
Answer:-a
750. Which was one of the first security subsets proposed?
a) FBJS
b) Caja
c) dojox.secure
d) ADSafe
Answer:-d
751. Which is the subset that transforms web content into secure modules that can be
safely hosted on a web page?
a) Microsoft Web Sandbox
b) ADsafe
c) Caja
d) dojox.secure
Answer:-d
752. What will be the output of the following JavaScript code?

var set = new Set();


set.add("one");
set.add("two");
for (let elements of set)
{
document.writeln(elements+" ");
}
a) one
b) two
c) one two
d) undefined
Answer:-c
753. What will be the output of the following JavaScript code?

set.add("AngularJS");
set.add("Bootstrap");
set.delete("Bootstrap");
document.writeln(set.size);
a) 2
b) 1
c) 0
d) Undefined
Answer:-b
754. What will be the output of the following JavaScript code?

set.add("one");
set.add("two");
set.add("three");
set.clear();
document.writeln(set.size);
a) one
b) 1
c) 2
d) 0
Answer:-d
755. What will be the output of the following JavaScript code?

set.add("one");
set.add("two”);
var itr=set.values();
document.writeln(itr.next().value);
a) one
b) two
c) error
d) undefined
Answer:-a
756. What will be the output of the following JavaScript code?
set.add("1");
set.add("2");
document.writeln(set.has("3"));
a) 3
b) true
c) false
d) 2
Answer:-c
757. What will be the output of the following JavaScript code?

const pi=3.14;
var pi=4;
console.log(pi);
a) This will flash an error
b) Prints 4
c) Prints 3.14
d) Ambiguity
Answer:-a
758. The let keyword cannot be used ___________
a) as a substitute of var
b) as a block statement to define new variables
c) to define variables that are scoped to a single expression
d) in a else if loop, as a substitute for var
Answer:-d
759. The main difference between the variables declared with var and with let is
__________
a) var is confined to a particular function but let is not
b) let is confined to a particular function but var is not
c) var defines values based on conditions but let does not
d) let doesn’t let you change the value of the variable
Answer:- b
760. What will be the output of the following JavaScript code if oddsums(5); is executed
after the following code snippet?

function oddsums(n)
{
let total = 0, result=[];
for(let x = 1; x <= n; x++)
{
let odd = 2*x-1;
total += odd;
result.push(total);
}
return result;
}
a) Returns [1,4,9,16,25]
b) Returns [1,2,3,4,5]
c) Returns [3,6,9,12,15]
d) Returns [1,3,5,7,9]
Answer:-a
761. What would be the result or type of error if p is not defined in the following
JavaScript code snippet?

console.log(p)
a) Zero
b) Null
c) Reference Error
d) Value not found Error
Answer:-c
762. What will be the output of the following JavaScript code?

let x=x+1;
console.log(x);
a) 0
b) Null
c) Reference error
d) NaN
Answer:-d
763. What will be the output of the following JavaScript code?

[x,y]=[y,x];
a) Throws exception
b) Swap the value of the two variables
c) Flashes an error
d) Creates a new reference object
Answer:-c
764. Which looping statement allows XML tags to appear in JavaScript programs and
adds API for operating on XML data?
a) for loop
b) while loop
c) for/each loop
d) do while loop
Answer:-c
765. Which exception does the Iterators throw from their next() method when there are
no more values to iterate, that work on finite collections?
a) Exit Iteration
b) Abort Iteration
c) Abort
d) Stop Iteration
Answer:-d
766. Which method of the iterable object returns an iterator object for the collection?
a) iterator()
b) _iterator_()
c) _iteration_()
d) _return_iterator_()
Answer:-b
767. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
var res = "";
res=res + Number.isSafeInteger(Math.pow(2, 53)-1)+": 2<sup>53</sup>-
1<br>";
document.getElementById("demo").innerHTML = res;
}
</script>
a) True
b) False
c) Error
d) Undefined
Answer:-a
768. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Number.MAX_VALUE;
}
</script>
a) 1.7976931348623157e+308
b) 1.7976931348623157e+305
c) 1.7976931348623157e+307
d) Error
Answer:-a
769. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Number.NEGATIVE_INFINITY;
}
</script>
a) -1000
b) -infinity
c) infinity
d) undefined
Answer:-b
770. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
var x = 100;
document.getElementById("demo").innerHTML = x.NEGATIVE_INFINITY;
}
</script>
a) True
b) False
c) Error
d) Undefiend
Answer:-d
771. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
var num = 5.56789;
var n = num.toExponential();
document.getElementById("demo").innerHTML = n;
}
</script>
a) 5.56789e+0
b) 5.57e+0
c) 5.568e+0
d) Error
Answer:-a
772. What convenience does the following JavaScript code snippet provide?

let succ = function(x) x+1, yes = function() true, no = function() false;


a) Functional behaviour
b) Modular behaviour
c) No convenience
d) Shorthand expression
Answer:-a
773. What does the following JavaScript code snippet do?

data.sort(function(a,b),b-a);
a) Sort in the alphabetical order
b) Sort in the chronological order
c) Sort in reverse alphabetical order
d) Sort in reverse numerical order
Answer:- d
774. What is the code to be used to trim whitespaces?
a) let trimmed = (l.trim() for (l in lines));
b) let trimmed = (trim(l));
c) let trimmed = l.trim();
d) let trimmed = for(l in lines));
Answer:-a
775. What will be the reaction when a catch clause has no conditionals?
a) Takes it to be 0
b) Takes it to be 1
c) Takes it to be true
d) Takes it to be false
Answer:-c
776. When will the finally block be called?
a) When there is no exception
b) When the catch does not match
c) When there is exception
d) After try-catch execution
Answer:-d
777. What is the return type of typeof for standard JavaScript objects?
a) xml
b) object
c) dom
d) html
Answer:-b
778. Which method to use while working with XML fragments, instead of XML()?
a) XMLInterface()
b) XMLClass()
c) XMLList()
d) XMLArray()
Answer:-c
779. Which of the following is the descendant operator?
a) ..
b) …
c) *
d) @
Answer:-a
780. Which of the following is an example to perform the most common XML
manipulations using the XML objects invocation?
a) insertChildBefore()
b) insertChildAfter()
c) appendChildAfter(…)
d) appendChildBefore(…)
Answer:-a
781. What is the code required to delete all “weight” tags?
a) delete weight(pt).all;
b) delete pt.element[all];
c) delete pt;
d) delete pt..weight;
Answer:-d
782. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
var x = 10;
var y = "20";
var z = x + y;
document.getElementById("demo").innerHTML = z;
</script>
a) 30
b) 10 20
c) 1020
d) Error
Answer:-c
783. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
var x = 10;
var y = 20;
document.getElementById("demo").innerHTML = x + y;
</script>
a) 1020
b) 10 20
c) 30
d) Error
Answer:-a
784. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
var x = "100";
var y = "10";
var z = x * y;
document.getElementById("demo").innerHTML = z;
</script>
a) 1000
b) 10
c) 10010
d) Error
Answer:-a
785. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
var x = 500; // x is a number
var y = new Number(500); // y is an object
document.getElementById("demo").innerHTML = (x===y);
</script>
a) true
b) false
c) error
d) undefined
Answer:-b
786. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
var x = 9.656;
document.getElementById("demo").innerHTML =
x.toFixed(0)
</script>
a) 10
b) 9.65
c) 9.6
d) 9.656
Answer:-a
787. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Math.trunc(8.76);
}
</script>
a) 8.70
b) 8.76
c) 8.00
d) Error
Answer:-c
789. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Math.LN10;
}
</script>
a) 2.00
b) 2.10
c) 2.20
d) 2.30
Answer:-d
790. What will be the output of the following JavaScript code?

<p id="demo"></p>

<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Math.acosh(2);
}
</script>
a) 1.31
b) 1.20
c) 1.11
d) 1.41
Answer:-a
791. What are the events generated by the Node objects called?
a) generators
b) emitters
c) dispatchers
d) highevents
Answer:-b
792. What is the function used to deregister event handler ‘f’?
a) deleteAllListeners(name)
b) deleteListener(name,f)
c) removeListener(name,f)
d) removeAllListeners(name)
Answer:-c
793. What is the function used to remove all handlers for name events?
a) deleteAllListeners(name)
b) deleteListener(name,f)
c) removeListener(name,f)
d) removeAllListeners(name)
Answer:-d
794. Which function is a synonym for on()?
a) addListener()
b) listeners()
c) once()
d) add()
Answer:-a
795. Which of the following is an event emitter?
a) once
b) process
c) listeners
d) on
Answer:- b
796. When do uncaught exceptions generate events?
a) When handlers are registered
b) When handlers are deregistered
c) When handler functions are called
d) When handlers do not have a matching catch clause
Answer:-a
797. Which among the following POSIX signals generate events?
a) SIGDOWN
b) SIGFLOAT
c) SIGINT
d) SIGSHORT
Answer:-c
798. What is the method used to pause “data” events?
a) s.pause();
b) s.stop();
c) s.halt();
d) s.wait();
Answer:-a
799. When the “end” event fires on EOF when no more data will arrive, which function is
called?
a) s.on(“data”,f);
b) s.on(“end”,f);
c) s.on(“error”,f);
d) s.on(“default”,f);
Answer:-b
800. What will be the return value of the write() method when the Node cannot write the
data immediately and has to buffer it internally?
a) 0
b) 1
c) True
d) False
Answer:-d

You might also like