* JAVASCRIPT QUIZ

Q 1. Inside which HTML element do we put the JavaScript?

Ans:- <script>

Q 2. What is the correct JavaScript syntax to change the content of the HTML element below?

Ans:- document.getElementById("demo").innerHTML = "Hello World!";

Q 3. Where is the correct place to insert a JavaScript?

Ans:- Both the <head> section and the <body> section are correct

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

Ans:- <script src="xxx.js">

Q 5. The external JavaScript file must contain the script> tag.

Ans:- False

Q 6. How do you write "Hello World" in an alert box?

Ans:- alert("Hello World");

Q 7. How do you create a function in JavaScript?

Ans:- function myFunction()

Q 8. How do you call a function named "myFunction"?

Ans:- myFunction()

Q 9. How to write an IF statement in JavaScript?

Ans:- if (i == 5)

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

Ans:- if (i != 5)

Q 11. How does a WHILE loop start?

Ans:- while (i <= 10)

Q 12. How does a FOR loop start?

Ans:- for (i = 0; i <= 5; i++)

Q 13. How can you add a comment in a JavaScript?

Ans:- //This is a comment

Q 14. How to insert a comment that has more than one line?

Ans:- /*This comment has more than one line*/

Q 15. What is the correct way to write a JavaScript array?

Ans:- var colors = ["red", "green", "blue"]

Q 16. How do you round the number 7.25, to the nearest integer?

Ans:- Math.round(7.25)

Q 17. How do you find the number with the highest value of x and y?

Ans:- Math.max(x, y)

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

Ans:- w2 = window.open("http://www.w3schools.com");

Q 19. JavaScript is the same as Java.

Ans:- False

Q 20. How can you detect the client's browser name?

Ans:- navigator.appName

Q 21. Which event occurs when the user clicks on an HTML element?

Ans:- onclick

Q 22. How do you declare a JavaScript variable?

Ans:- var carName;

Q 23. Which operator is used to assign a value to a variable?

Ans:- =

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

Ans:- true

Q 25. Is JavaScript case-sensitive?

Ans:- Yes


* jQuery QUIZ

Q 1. Which of the following is correct?

Ans:- jQuery is a JavaScript Library

Q 2. jQuery uses CSS selectors to select elements?

Ans:- True

Q 3. Which sign does jQuery use as a shortcut for jQuery?

Ans:- the $ sign

Q 4. Look at the following selector: $("div"). What does it select?

Ans:- All div elements

Q 5. Is jQuery a library for client scripting or server scripting?

Ans:- Client scripting

Q 6. Is it possible to use jQuery together with AJAX?

Ans:- Yes

Q 7. The jQuery html() method works for both HTML and XML documents

Ans:- False

Q 8. What is the correct jQuery code to set the background color of all p elements to red?

Ans:- $("p").css("background-color","red");

Q 9. With jQuery, look at the following selector: $("div.intro"). What does it select?

Ans:- All div elements with class="intro"

Q 10. Which jQuery method is used to hide selected elements?

Ans:- hide()

Q 11. Which jQuery method is used to set one or more style properties for selected elements?

Ans:- css()

Q 12. Which jQuery method is used to perform an asynchronous HTTP request?

Ans:- jQuery.ajax()

Q 13. What is the correct jQuery code for making all div elements 100 pixels high?

Ans:- $("div").height(100)

Q 14. Which statement is true?

Ans:- To use jQuery, you can refer to a hosted jQuery library at Google

Q 15. What scripting language is jQuery written in?

Ans:- JavaScript

Q 16. Which jQuery function is used to prevent code from running, before the document is finished loading?

Ans:- $(document).ready()

Q 17. Which jQuery method should be used to deal with name conflicts?

Ans:- noConflict()

Q 18. Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements?

Ans:- toggleClass()>

Q 19. Look at the following selector: $("div p"). What does it select?

Ans:- All p elements inside a div element

Q 20. Is jQuery a W3C standard?

Ans:- No

Q 21. Look at the following selector: $("p#intro"). What does it select?

Ans:- The p element with id="intro"

Q 22. Which jQuery method is used to remove selected elements?

Ans:- Both methods can be used

Q 23. Look at the following selector: $(":disabled"). What does it select?

Ans:- All disabled input elements

Q 24. Which jQuery method returns the direct parent element of the selected element?

Ans:- parent()

Q 25. The jQuery animate() method can be used to animate ANY CSS property?

Ans:- Only properties containing numeric values


* BOOTSTRAP QUIZ

Q 1. Bootstrap 3 is mobile-first.

Ans:- True

Q 2. Which class provides a responsive fixed width container?

Ans:- .container

Q 3. Which class provides a full width container, spanning the entire width of the viewport?

Ans:- .container-fluid

Q 4. The Bootstrap grid system is based on how many columns?

Ans:- 12

Q 5. Which class adds zebra-stripes to a table?

Ans:- .table-striped

Q 6. Which class shapes an image to a circle?

Ans:- .img-circle

Q 7. Which class is used to create a big box for calling extra attention?

Ans:- .jumbotron

Q 8. Which button class is used to create a large button?

Ans:- .btn-lg

Q 9. Which class is used to create a button group?

Ans:- .btn-group

Q 10. How can you insert a search icon?

Ans:- <span class="glyphicon glyphicon-search">

Q 11. Which class is used to create a badge?

Ans:- .badge

Q 12. Which class is used to create a basic pagination?

Ans:- .pagination

Q 13. Which class is used to create a basic list group?

Ans:- .list-group

Q 14. Which class adds a heading to a panel?

Ans:- .panel-heading

Q 15. Which class indicates a dropdown menu?

Ans:- .dropdown

Q 16. A standard navigation tab is created with:

Ans:- <ul class="nav nav-tabs">

Q 17. A standard navigation bar is created with:

Ans:- <nav class="navbar navbar-default">

Q 18. Which class is used to create a black navigation bar?

Ans:- .navbar-inverse

Q 19. Which plugin is used to cycle through elements, like a slideshow?

Ans:- Carousel

Q 20. Which plugin is used to create a modal window?

Ans:- Modal

Q 21. Which plugin is used to create a tooltip?

Ans:- Tooltip

Q 22. Which contextual class indicates a succesful or positive action?

Ans:- .text-success

Q 23. Which contextual class indicates a dangerous or potentially negative action?

Ans:- .text-danger

Q 24. Which class indicates uppercased text?

Ans:- .text-uppercase

Q 25. The Bootstrap grid system works across multiple devices.

Ans:- True


* CSS QUIZ

Q 1. What does CSS stand for?

Ans:- Cascading Style Sheets

Q 2. What is the correct HTML for referring to an external style sheet?

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

Q 3. Where in an HTML document is the correct place to refer to an external style sheet?

Ans:- In the <head> section

Q 4. Which HTML tag is used to define an internal style sheet?

Ans:- <style>

Q 5. Which HTML attribute is used to define inline styles?

Ans:- style

Q 6. Which is the correct CSS syntax?

Ans:- body {color: black;}

Q 7. How do you insert a comment in a CSS file?

Ans:- /* this is a comment */

Q 8. Which property is used to change the background color?

Ans:- background-color

Q 9. How do you add a background color for all <h1> elements?

Ans:- h1 {background-color:#FFFFFF;}

Q 10. Which CSS property is used to change the text color of an element?

Ans:- color

Q 11. Which CSS property controls the text size?

Ans:- font-size

Q 12. What is the correct CSS syntax for making all the elements bold?

Ans:- p {font-weight:bold;}

Q 13. How do you display hyperlinks without an underline?

Ans:- a {text-decoration:none;}

Q 14. How do you make each word in a text start with a capital letter?

Ans:- text-transform:capitalize

Q 15. Which property is used to change the font of an element?

Ans:- Both font-family and font can be used

Q 16. How do you make the text bold?

Ans:- font-weight:bold;

Q 17. How do you display a border like this: The top border = 10 pixels The bottom border = 5 pixels The left border = 20 pixels The right border = 1pixel?

Ans:- <border-width:10px 1px 5px 20px;>

Q 18. Which property is used to change the left margin of an element?

Ans:- margin-left>

Q 19. When using the padding property; are you allowed to use negative values?

Ans:- no

Q 20. How do you make a list that lists its items with squares?

Ans:- list-style-type: square;

Q 21. How do you select an element with id "demo"?

Ans:- #demo

Q 22. How do you select elements with class name "test"?

Ans:- .test

Q 23. How do you select all p elements inside a div element?

Ans:- div p

Q 24. How do you group selectors?

Ans:- Separate each selector with a comma

Q 25. What is the default value of the position property?

Ans:- static


* HTML QUIZ

Q 1. What does HTML stand for?

Ans:- Ans:- Hyper Text Markup Language

Q 2. Who is making the Web standards?

Ans:- The World Wide Web Consortium

Q 3. Choose the correct HTML element for the largest heading:

Ans:- <h1>

Q 4. What is the correct HTML element for inserting a line break?

Ans:- <br>

Q 5. What is the correct HTML for adding a background color?

Ans:- <body style="background-color:yellow;">

Q 6. Choose the correct HTML element to define important text

Ans:- <strong>

Q 7. Choose the correct HTML element to define emphasized text

Ans:- <em>

Q 8. What is the correct HTML for creating a hyperlink?

Ans:- <a href="http://www.mmsonu.6te.net.com">mmsonu</a>

Q 9. Which character is used to indicate an end tag?

Ans:- /

Q 10. How can you open a link in a new tab/browser window?

Ans:- <a href="url" target="_blank">

Q 11. Which of these elements are all <table> elements?

Ans:- <table><tr><td>

Q 12. Inline elements are normally displayed without starting a new line.

Ans:- True

Q 13. How can you make a numbered list?

Ans:- <ol>

Q 14. How can you make a bulleted list?

Ans:- <ul>

Q 15. What is the correct HTML for making a checkbox?

Ans:- <input type="checkbox">

Q 16. What is the correct HTML for making a text input field?

Ans:- <input type="text">

Q 17. What is the correct HTML for making a drop-down list?

Ans:- <select>

Q 18. What is the correct HTML for making a text area?

Ans:- <textarea>

Q 19. What is the correct HTML for inserting an image?

Ans:- <img src="image.gif" alt="MyImage">

Q 20. What is the correct HTML for inserting a background image?

Ans:- <body style="background-image:url(background.gif)">

Q 21. <iframe> is used to display a web page within a web page.

Ans:- True

Q 22. HTML comments start with <!-- and end with -->

Ans:- True

Q 23. Block elements are normally displayed without starting a new line.

Ans:- False

Q 24. Which HTML element defines the title of a document?

Ans:- <title>

Q 25. Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed?

Ans:- alt

Q 26. Which doctype is correct for HTML5?

Ans:- <!DOCTYPE html>

Q 27. Which HTML element is used to specify a footer for a document or section?

Ans:- <footer>

Q 28. In HTML, you can embed SVG elements directly into an HTML page.

Ans:- True

Q 29. What is the correct HTML element for playing video files?

Ans:- <video>

Q 30. What is the correct HTML element for playing audio files?

Ans:- <audio>

Q 31. The HTML global attribute, "contenteditable" is used to:

Ans:- Specify whether the content of an element should be editable or not

Q 32. In HTML, onblur and onfocus are:

Ans:- Event attributes

Q 33. Graphics defined by SVG is in which format?

Ans:- XML

Q 34. The HTML <canvas> element is used to:

Ans:- draw graphics

Q 35. In HTML, which attribute is used to specify that an input field must be filled out?

Ans:- required

Q 36. Which input type defines a slider control?

Ans:- range

Q 37. Which HTML element is used to display a scalar measurement within a range?

Ans:- <meter>

Q 38. Which HTML element defines navigation links?

Ans:- <nav>

Q 39. In HTML, what does the <aside> element define?

Ans:- Content aside from the page content

Q 40. Which HTML element is used to specify a header for a document or section?

Ans:- <header>

Free Web Hosting