News Breaking
Live
wb_sunny

Breaking News

GK

GK


JavaScript Quiz

1. What does CSS stand for? Creative Style Sheets
Computer Style Sheets
Cascading Style Sheets
Creative Color Sheets 2. Which type of CSS controls an entire site from one file attribute? Inline +
External
Embedded

3. Which type of CSS adds individual html tags in a page by using the "style" attribute? Inline
External
Embedded

4. Which type of CSS is used to control the display of elements on an individual page by adding formatting instructions between head tags? Inline
External
Embedded

5. Where in an HTML document is the correct place to refer to an external style sheet? At the top of the document
In the head section
In the body section
At the end of the document

6. Which is the correct CSS syntax? body {color: black}
body:color=black
{body:color=black(body}
{body;color:black}} 7. How do you insert a comment in a CSS file? // this is a comment //
// this is a comment
' this is a comment
/* this is a comment */ 8. How do you add a background color for all H1 elements? h1.all {background-color:#000000}
h1 {background-color:#000000
all.h1 {background-color:#000000} 9. How do you display hyperlinks without an underline? a {underline:none}
a {text-decoration:no underline}
a {text-decoration:none} 10. How do you change the left margin of an element? margin-left
text-indent
margin
indent 11. What is the correct HTML for making a text input field? input type="textfield"
textfield
input type="text"
text input type="text" 12. What is the correct HTML for making a checkbox? input type="check"
checkbox
input type="checkbox"
check 13. What is the correct HTML for making a drop-down list? select
input type="list"
input type="dropdown"
list 14. What is the correct HTML for making a text area? input type="textbox"
textarea
input type="textarea"
15. Which attribute specify where to send a form? action
input
method
16. Which of the following is not a form field? reset button
radio button
tool box 17. What tells the browser where the form starts and ends? access
form
span
18. Password fields are similar to what? Text fields except text show as asterix
Text area except text show as asterix
Hidden fields except text show as asterix
19. One line areas that allow the user to input text are called? Text area
Text field
Written field
20. The value setting of a text field defines what? If the value entered is a proper value
The length of the field
What will appear in the field as the default value 21. What is the correct JavaScript syntax to write "Welcome"? "Welcome"
response.write("Welcome
("Welcome")
document.write("Welcome 22. Where is the correct place to insert a JavaScript? The head section
The body section
Both the head section and the body section are correct
23. How do you write "Hello World" in an alert box? alertBox("Hello World")
msgBox("Hello World")
alert("Hello World")
alertBox="Hello World" 24. How do you call a function named "myFunction"? myFunction()
call myFunction()
call function myFunction
25. How do you write a conditional statement for executing some code if "x" is equal to 6? if x=6 then
if x=6
if x==6 then
if (x==6) 26. How do you create a function? function myFunction()
function=myFunction()
function:myFunction()
27. What is a variable? A method that is often used to display information
A container for storing information
A self-contained routine that performs instructions
The way values are assigned to variables 28. Which of these is not a correct operator? !
||
&&
| 29. When saving an external JavaScript files, which extension do you use? .ext
.css
.js
.java 30. Which converts a string to floating point numbers? eval
ParseFloat
ParseInt
None of the above
______________________________________________________ JavaScript // JavaScript Document var score=0; var wrong=""; function Check() { if (CSS.Q1[2].checked) { score++; } else { wrong=wrong+"Q1, "; } if (CSS.Q2[1].checked) { score++; } else { wrong=wrong+"Q2, "; } if (CSS.Q3[2].checked) { score++; } else { wrong=wrong+"Q3, "; } if (CSS.Q4[0].checked) { score++; } else { wrong=wrong+"Q4, "; } if (CSS.Q5[2].checked) { score++; } else { wrong=wrong+"Q5, "; } if (CSS.Q6[0].checked) { score++; } else { wrong=wrong+"Q6, "; } if (CSS.Q7[2].checked) { score++; } else { wrong=wrong+"Q7, "; } if (CSS.Q8[0].checked) { score++; } else { wrong=wrong+"Q8, "; } if (CSS.Q9[2].checked) { score++; } else { wrong=wrong+"Q9, "; } if (CSS.Q10[1].checked) { score++; } else { wrong=wrong+"Q10, "; } if (CSS.Q11[0].checked) { score++; } else { wrong=wrong+"Q11, "; } if (CSS.Q12[2].checked) { score++; } else { wrong=wrong+"Q12, "; } if (CSS.Q13[1].checked) { score++; } else { wrong=wrong+"Q13, "; } if (CSS.Q14[2].checked) { score++; } else { wrong=wrong+"Q14, "; } if (CSS.Q15[0].checked) { score++; } else { wrong=wrong+"Q15, "; } if (CSS.Q16[1].checked) { score++; } else { wrong=wrong+"Q16, "; } if (CSS.Q17[2].checked) { score++; } else { wrong=wrong+"Q17, "; } if (CSS.Q18[0].checked) { score++; } else { wrong=wrong+"Q18, "; } if (CSS.Q19[2].checked) { score++; } else { wrong=wrong+"Q19, "; } if (CSS.Q20[2].checked) { score++; } else { wrong=wrong+"Q20, "; } if (CSS.Q21[2].checked) { score++; } else { wrong=wrong+"Q21, "; } if (CSS.Q22[0].checked) { score++; } else { wrong=wrong+"Q22, "; } if (CSS.Q23[1].checked) { score++; } else { wrong=wrong+"Q23, "; } if (CSS.Q24[2].checked) { score++; } else { wrong=wrong+"Q24, "; } if (CSS.Q25[2].checked) { score++; } else { wrong=wrong+"Q25, "; } if (CSS.Q26[0].checked) { score++; } else { wrong=wrong+"Q26, "; } if (CSS.Q27[1].checked) { score++; } else { wrong=wrong+"Q27, "; } if (CSS.Q28[0].checked) { score++; } else { wrong=wrong+"Q28, "; } if (CSS.Q29[0].checked) { score++; } else { wrong=wrong+"Q29, "; } if (CSS.Q30[2].checked) { score++; } else { wrong=wrong+"Q30, "; } alert("You got "+score/30*100+"%"); alert("You got "+wrong+" wrong."); }

Tags

Newsletter Signup

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque.

Post a Comment