You are on page 1of 12

1.

The first line of HTTP request message is called _____________


a) Request line
b) Header line
c) Status line
d) Entity line
Answer: a

2. The __________ method when used in the method field, leaves entity body empty.
a) POST
b) SEND
c) GET
d) PUT
Answer: c

3. HTML stands for?


A Hyper Text Markup Language
.
B High Text Markup Language
.
C Hyper Tabular Markup Language
.
D None of these
.
Option: A

4. From which tag descriptive list starts ?


A <LL>
.
B <DD>
.
C <DL>
.
D <DS>
.
Option: C

5The attribute of <form> tag


A Method
.
B Action
.
C Both (a)&(b)
.
D None of these
.
Option: C
6. Which of the following attributes of text box control allow to limit the maximum character?
A size
.
B len
.
C maxlength
.
D all of these
.
Option: C

7. How can you open a link in a new browser window?


A < a href = "url" target = "new">
.
B <a href = "url" target= "_blank">
.
C <a href = "url".new>
.
D <a href = "url" target ="open">
.
Option: B

8. Which of the following tag is used for audio in HTML5?

a) <bgsound>
b) <audio>
c) <video>
d) <canvas>
Answer: b

9. Which of the following HTML Video – Media Type is not supported in IE?
a) WebM
b) MP4
c) Ogg
d) MP4 FLAC
Answer: c

10. Which of the following is the correct syntax for referring the external style
sheet?

a. <style src = example.css>

b. <style src = "example.css" >

c. <stylesheet> example.css </stylesheet>


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

Answer: (d)

11. Which type of CSS is used in the below code?

1. <p style = "border:2px solid red;">  

a. Inline CSS

b. Internal CSS

c. External CSS

d. None of the above

Answer: (a) 

12. How can we write comment along with CSS code ?


A.
/* a comment */
B.
// a comment //

C.
/ a comment /
D.
<' a comment'>

Answer : /* a comment */ [Option : A]

13. Which of the following selector matches a element based on its class attribute?
A - The Type Selector
B - The Universal Selector
C - The Descendant Selector
D - The Class Selector
Answer : D
14. Which of the following property is used to set the background color of an element in
CSS?
A - background-color
B - background-image
C - background-repeat
D - background-position
Answer : A

15. Which of the following property of a anchor element signifies an element on which
the user is currently clicking?
A - :link
B - :visited
C - :hover
D - :active
Answer : D

16. Which of the following property changes the width of right border in css?
A - :border-bottom-width
B - :border-top-width
C - :border-left-width
D - :border-right-width
Answer : D

17. Which of the following property specifies the bottom padding of an element in css?
A - padding-bottom
B - padding-top
C - padding-left
D - padding-right
Answer : A
18. Which of the following method skews an element along the X and Y-axis by the given
angles using transform in CSS?

 A. skewX()

 B. skewy()

 C. skew-X-Y()

 D. skew()

 Answer: Option D
19. Which of the following css property is used to indicate if an animation plays in reverse or
repeats itself every other iteration?

 A. animation-iteration

 B. animation-check

 C. animation-direction

 D. animation-state

 Answer: Option C

20. Which type of JavaScript language is ___

a. Object-Oriented

b. Object-Based

c. Assembly-language

d. High-level

Answer: B

Question 1:
Inside which HTML element do we put the JavaScript?

<script>    Your answer  
<js>
<javascript>
<scripting>
Question 2:
What is the correct JavaScript syntax to change the content of the HTML element below?

<p id="demo">This is a demonstration.</p>

document.getElementByName("p").innerHTML = "Hello World!";    Your


answer  
#demo.innerHTML = "Hello World!";
document.getElement("p").innerHTML = "Hello World!";
document.getElementById("demo").innerHTML = "Hello World!";    Correct
answer  

Question 3:
Where is the correct place to insert a JavaScript?

The <head> section    Your answer  


Both the <head> section and the <body> section are correct    Correct
answer  
The <body> section

Question 4:
What is the correct syntax for referring to an external script called "xxx.js"?

<script src="xxx.js">    Your answer  


<script name="xxx.js">
<script href="xxx.js">
Question 5:
The external JavaScript file must contain the <script> tag.

True    Your answer  
False    Correct answer  

Question 6:
How do you write "Hello World" in an alert box?

alertBox("Hello World");    Your answer  


msg("Hello World");
msgBox("Hello World");
alert("Hello World");    Correct answer  

Question 7:
How do you create a function in JavaScript?

function myFunction()    Your answer  


function = myFunction()
function:myFunction()

Question 8:
How do you call a function named "myFunction"?

myFunction()    Your answer  
call myFunction()
call function myFunction()
Question 9:
How to write an IF statement in JavaScript?

if (i == 5)    Your answer  
if i = 5 then
if i == 5 then
if i = 5

Question 10:
How to write an IF statement for executing some code if "i" is NOT equal to 5?

if (i != 5)    Your answer  
if (i <> 5)
if i =! 5 then
if i <> 5

Question 11:
How does a WHILE loop start?

while (i <= 10)    Your answer  


while (i <= 10; i++)
while i = 1 to 10

Question 12:
How does a FOR loop start?
for (i = 0; i <= 5; i++)    Your answer  
for (i = 0; i <= 5)
for i = 1 to 5
for (i <= 5; i++)

Question 13:
How can you add a comment in a JavaScript?

<!--This is a comment-->    Your answer  


'This is a comment
//This is a comment    Correct answer  

Question 14:
How to insert a comment that has more than one line?

<!--This comment has


more than one line-->    Your answer  
/*This comment has
more than one line*/    Correct answer  
//This comment has
more than one line//

Question 15:
What is the correct way to write a JavaScript array?

var colors = ["red", "green", "blue"]    Your answer  


var colors = "red", "green", "blue"
var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")
var colors = (1:"red", 2:"green", 3:"blue")
Question 16:
How do you round the number 7.25, to the nearest integer?

Math.round(7.25)    Your answer  
Math.rnd(7.25)
rnd(7.25)
round(7.25)

Question 17:
How do you find the number with the highest value of x and y?

ceil(x, y)    Your answer  


Math.ceil(x, y)
top(x, y)
Math.max(x, y)    Correct answer  

Question 18:
What is the correct JavaScript syntax for opening a new window called "w2" ?

w2 = window.open("http://www.w3schools.com");    Your answer  
w2 = window.new("http://www.w3schools.com");

Question 19:
JavaScript is the same as Java.

False    Your answer  
True

Question 20:
How can you detect the client's browser name?

navigator.appName    Your answer  
client.navName
browser.name

Question 21:
Which event occurs when the user clicks on an HTML element?

onmouseover    Your answer  
onmouseclick
onchange
onclick    Correct answer  

Question 22:
How do you declare a JavaScript variable?

var carName;    Your answer  


variable carName;
v carName;

Question 23:
Which operator is used to assign a value to a variable?
=    Your answer  
x
-
*

Question 24:
What will the following code return: Boolean(10 > 9)

NaN    Your answer  
true    Correct answer  
false

Question 25:
Is JavaScript case-sensitive?

No    Your answer  
Yes    Correct answer  

You might also like