0% found this document useful (0 votes)
5 views

Chapter 2

The document consists of multiple-choice questions (MCQs) focused on Cascading Style Sheets (CSS) and JavaScript, covering topics such as syntax, advantages, disadvantages, and events related to these technologies. It includes questions about CSS rules, JavaScript functions, and the interaction of users with web pages. The content serves as an educational exercise to test knowledge on web development concepts.

Uploaded by

nonco4613
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Chapter 2

The document consists of multiple-choice questions (MCQs) focused on Cascading Style Sheets (CSS) and JavaScript, covering topics such as syntax, advantages, disadvantages, and events related to these technologies. It includes questions about CSS rules, JavaScript functions, and the interaction of users with web pages. The content serves as an educational exercise to test knowledge on web development concepts.

Uploaded by

nonco4613
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Chapter 2:-Cascading Style Sheets and JavaScript

Textual Exercise:-MCQ

 Choose the most appropriate option from those given below:


1. Which of the following allows specifying styles for the visual elements of the website?
(A) Cascading Style Sheets (B) Webpage (C) Form (D) Animation
2. Which of the following is known as special symbol in the syntax of CSS?
(A) Rules (B) Selector (C) Declaration (D) Input
3. Which of the following are two main parts of CSS rule?
(A) Selector, declaration (B) Select, declaration
(C) Selector, declare (D) Selection, declaration
4. Which of the following is an HTML element on which style can be applied?
(A) Declaration (B) selector (C) select (D) declare
5. Which of the following is the syntax of CSS?
(A) Select {property : value} (B) selector {value : property}
(C) selector {property : value} (D) selection {property : value}
6. Which of the following has developed JavaScript?
(A) Yahoo (B) Google (C) Wikipedia (D) Netscape
7. Which of the following is a scripting language that allows adding programming to web pages?
(A) Action script (B) JavaScript (C) HTML (D) CSS
8. Which of the following is a scripting language that is simple, lightweight programming language that
does not contain advanced programming functionalities?
(A) JavaScript (B) HTML (C) C (D) Java
9. Which of the following tag is used to insert JavaScript code into a HTML page?
(A) <script>…<script> (B) <script>…</script>
(C) <script>…<//script> (D) </script>…</script>
10. Which of the following symbol signifies the start and end of a JavaScript block?
(A) Semicolon (B) square bracket (C) curly bracket (D) round bracket
11. Which of the following is a reusable block of code that performs a particular task?
(A) Array (B) Code (C) Program (D) Function
12. Which of the following statement is used to return a value in a function?
(A) Return (B) function (C) select (D) send
13. Which of the following is generated by the browser due to interaction between the user and the
webpage?
(A) Function (B) Response (C)Event (D) Value
14. Which of the following is not an event?
(A) Abort (B) Mouseover (C) Set (D) Load
15. Which of the following is a container for storing data?
(A) Variable (B) integer (C) Event (D) Event handler
16. Which of the following stands for BOM?
(A) Browser Of Model (B) Browser Object Model
(C)Browser Object Modeling (D) Browser Object Model
17. Which of the following is the top level object in the browser object model?
(A) Window (B) Document (C) Page (D) Location
18. Which of the following stands for NaN?
(A) Not a Numeric (B) Not a Number (C) Not a Noun (D) Not an Numeric

INTRODUCTION
 Choose the most appropriate option from those given below:
What is the full form of CSS?
(A) Case Study Sheet (B) Computer Style Sheet
(C) Cascading Style Sheet (D) Computerized Spread Sheet
2. Which of the following option helps us to keep the information content of a document separate from the
details of how to display it?
(A) HTML (B) HTTP (C) Java Script (D) CSS
3. What is style?
(A) The detail of how to display the document (B) The detail of how to write the document
(C) Cascading Pattern of HTML document (D)Cascading pattern of Java script document
4. By using which option, we can set all element types to appear in a style as per our choice?
(A) Java script (B) CSS (C) Web browser (D) Web server
5. Which of the following describes the information content of the document?
(A) CSS (B) Web Server (C) HTML (D) Java Script
6. Which option describes the style of the elements in the document and not its contents?
(A) CSS (B) Web browser (C) HTML (D) Both A & C
7. Which of the following option/s of our web site is/are controlled by CSS?
(A) Font types (B) Font and element colors (C) Margins (D) All A, B & C
8. Pad spaces and element position of our website are controlled by which option?
(A) HTML (B) CSS (C) Java Script (D) Web Browser
SYNTAX OF CSS
9. In how many parts CSS rules are mainly divided?
(A) Four (B) Six (C) Two (D) Three
10. Which are the main parts of CSS rule?
(A) A Selector and one or more preference (B) A Property and one or more values
(C) A Selector and one or more declarations (D) None of these
11. Which of the following consists of a property associated with the HTML element used in selector and its
corresponding value?
(A) HTML (B) Declaration (C) Edit menu (D) <p> tag

12. Styles can be applied on which of the following HTML element?


(A) Declaration (B) Property (C) Value (D) Selector
13. In the example of CSS,
H1 { color : green};
Which is selector?
(A) H1 (B) Color (C) Green (D) {}

14.In “H1 { color : green}”; what is color?


(A) Property (B) Value (C) Selector (D) Style
15.In “H1{ color : green}”; which is the value of property?
(A) H1 (B) Green (C) : (D) {}
16.Which option is used to make sure that KompoZer uses CSS by default?
(A) FilePreference (B)InsertPreference (C)ToolsPreference (D)EditPreference
17.Which category should be selected in “Options” dialog box?
(A) Text (B) General (C) Background (D) Box
18.In Operations dialog box, which checkbox should be selected in General category?
(A) Use HTML elements and attributes
(B) Use CSS syntax
(C) Use CSS styles instead of HTML elements and attributes
(D) Use CSS preferences
19.Which button should be selected in the composition toolbar to apply CSS styles?
(A) Cascade (B) CSS (C) HTML elements (D) Style
20.Which dialog box will be opened, if the file is not saved?
(A) Page title (B) Style sheet (C) Borders (D) Lists
21.By using which option, we can choose an element to create the style rule?
(A) Radio button (B) Check box (C) Lists (D) Drop down menu
22. Under which heading a style rule will appear, whenever we add new element, in CSS Style sheets
dialog box?
(A) General (B) Internal Style sheet (C) Aural (D) Background
23.Which of the following tab is not available in the right side of the CSS Style sheets dialog box?
(A) Aural (B) Borders (C) New style (D) Text
24.In which section we can select fonts of our choice?
(A) Font family (B) Font weight (C) Font style (D) Case
25.Which button we have to click in Image option, to keep an image in the background?
(A) Select image (B) Choose file (C) Choose image (D)Select image
26.Which checkbox should be selected to apply the same border on all four sides?
(A) Apply to all sides (B) Apply to all four sides
(C) Select all Sides (D) All four sides use same border style
27.For borders which options are available?
(A) Style, Width, Size (B) General, Box, Border (C) Style, Width, Color (D)General,Length, size
28.Which tab will show the CSS code?
(A) CSS (B) General (C) Text (D) HTML
29.Which bottom tab should be selected to view the CSS style sheet code?
(A) Design (B) General (C) Split (D) Both A & B
ADVANTAGES OF CSS
30.Which of the following allows us to set the format of the website without changing the underlying
structure?
(A) HTML (B) JavaScript (C) Forms (D) CSS
31. Which of the following can make website designing quick and efficient?
(A) CSS (B) HTML (C) Forms (D) Java script
32. Which of the following has less code compared to that in HTML?
(A) JavaScript (B) CSS C) Forms (D) Web browser

DISADVANTAGES OF CSS
33. Which program does not support some of the style features?
(A) Panel (B) Status bar (C) Browser (D) Editor
JAVASCRIPT
34. What was the use of HTML originally?
(A) To do programming (B) To display images
(C) To design Server (D) To control the appearance of web pages
35. Which kind of web pages can be created using HTML?
(A) Dynamic (B) Static (C) Simple without formatting (D) All A, B & C
36. Which scripting language allows us to add programming aspects to our web pages?
(A) VB Script (B) C++ (C) JavaScript (D) Java
37. Which are the features of scripting language?
(A) It is simple
(B) Light weight programming language
(C) It doesn’t contain the advanced programming functionalities like C and Java
(D) All A, B & C
38. Which is used to improve the design in web pages and validate the forms?
(A) JavaScript (B) HTML (C) CSS (D) HTML Forms
39. Which can add interactivity to HTML pages?
(A) CSS (B) JavaScript (C) HTML (D) Frames
40. Which of the following can be inserted directly into the HTML code?
(A) CSS (B) VB Script (C) JavaScript (D) HTML
41. Which of the following is used to create HTML content dynamically?
(A) Web server (B) JavaScript (C) CSS (D) Web browser
42. What will restrict users from making mistakes?
(A) Web Browser (B)Validation (C) HTML Forms (D) CSS
43. Which is the most common form of JavaScript today?
(A) Client side script (B) Server side script (C) Both A & B (D) VB Script
44. Which of the following is used to validate the data entered in the HTML forms on the client side before
sending it to the server?
(A) CSS (B) HTML Forms (C) JavaScript (D) Web Browser
45. Which of the following is case sensitive language?
(A) CSS (B) HTML (C) Web Browser (D) JavaScript
46. Generally, within which tag the JavaScript code will be placed?
(A) <Body> (B) <Head> (C) <Style> (D) <Java>
47. Which tag tells the browser to interpret all the text between the <script> tag as a script?
(A) <Script> (B) <CSS> (C) <style> (D) <body>
48. In the statement,document.write(“Hello World”);”Which is the method?
(A) Hello World (B) document (C) document.write (D) write
49. In the above statement, which is object?
(A) “Hello World” (B) write (C) document (D) document.write
50. Where should we pass the string which is to be displayed?
(A) In <body> tag
(B) As variable to the method document. Write()
(C) As script to the <style> tag
(D) None of these
51. Which symbol is used as a mark of separation or termination?
(A) Colon (B) Dot (C) Comma (D) Semicolon
52. What is used to create a group of JavaScript statements?
(A) Group (B) Block (C) Function (D) Program
53. Which symbols are used to start and end a block?
(A) ( ) (B) [ ] (C) { } (D) “ ”
54. In the form, what should be kept simple and easy to remember?
(A) Block Name (B) Name given to the form (C) Input field name (D) Both B & C
55. Which button will open “Advanced Property Editor” dialog box?
(A) Advanced Edit (B) Open (C) General (D) Properties
56. A reusable block of code that performs a particular task is called…..
(A) Script (B) Function (C) Style sheet (D) Web page
57. What is another name of function?
(A) Web page (B) Program (C) Routine (D) Style sheet
58. What is defined by the keyword function?
(A) Style sheet (B) Function (C) Routine (D) Both B & C
59. Where can we write block of code?
(A) Inside the Paranthesis ( ) (B) Inside the Square brackets [ ]
(C) Inside the curly braces { } (D) Within double quotes”
60. Which of the following is inbuilt function of JavaScript?
(A) ValidateForm( ) (B) alert( ) (C) Check ( ) (D) Draw( )
61. Which function takes the text and displays it in an alert box?
(A) Alert( ) (B) write( ) (C) display( ) (D) show( )
62. How can we execute the function?
(A) By an event (B) Call it inside a source code
(C) By clicking on it (D) Both A & B
63. Where can we define function?
(A) In Head section (B) In Body section (C) Both A & B (D) In CSS section
64. How can we call function?
(A) By its value (B) By Body tag (C) By its name (D) None of these
65. By using which statement, it is possible to return function value?
(A) Document.write( ) (B) Return (C) Showvalue( ) (D) Display( )
EVENTS
(66).Which kind of web pages can be created using JavaScript?
(A) Static (B) Unformatted (C) Simple Text based (D) Interactive
(67).What will be generated by browser, when the interaction between the user and the web page occur?
(A) Action (B) Method (C) Event (D) Interaction
(68).What will take place when user does something?
(A) Downloading (B) Uploading (C) Both A & B (D) Event
(69).Which event would occur when loading of image is cancelled?
(A) Abort (B) Error (C) Load (D) Reset
(70).With which event, elements such as radio button becomes inactive?
(A) Change (B) Blur (C) Unload (D) Select
(71).Which event would occur when user clicks on a form element?
(A) Focus (B) Change (C) Click (D) Reset
(72).Which event would occur when value of a form field is changed by the user?
(A) MouseOut (B) Load (C) Reset (D) Change
(73)Which event would occur when error occurs during loading of a document or image?
(A) Error (B) Submit (C) Mouseover (D) Unload
(74).Which event would occur when element such as button becomes active?
(A) Abort (B) Blur (C) Select (D) Focus
(75).Which event would occur when document or image is loaded?
(A) Focus (B)Reset (C) Load (D) Unload
(76).Which event would occur when we move mouse off the element?
(A) Change (B) MouseOut (C) Mouseover (D) Click
(77).Which event would occur when we move mouse over the element?
(A) Change (B) Load (C) Reset (D) Mouseover
(78)With which event, form fields are reset to default values?
(A) Change (B) Select (C) Reset (D) Error
(79)Which event would occur when user selects a form field?
(A) Submit (B) Select (C) Change (D) Load
(80)Which event would occur when user submits a form?
(A) Submit (B) Reset (C) Both A & B (D) Load
(81)Which event would occur when user leaves a page?
(A) Blur (B) Error (C) Unload (D) Reset
(82)What is the name of JavaScript code which is executed in response to a given situation, when event
occurs?
(A) Validation (B) Event handler (C) Function (D) Event
(83)Which names are kept same as the name of the event?
(A) Function (B) File (C) Script (D) Event handler

VARIABLES
(84)Which type of data can be stored in the variables?
(A) Numbers (B) Strings (C) Text (D) All A, B & C
(85)With which keyword we can declare a variable?
(A) Var (B) Script (C) CSS (D) HTML
IF STATEMENT

(86)Which conditional statement is used to change the flow of the program?


(A) Script (B) If (C)Function (D) Method
(87)Why the conditional statement if is used?
(A) To declare variable (B) to create function
(C)To change the flow of program (D)To break the program
(88)In which condition, the program enters if block and executes the statements inside it?
(A) False (B) Unpredictable (C) Any (D) True

DOCUMENT OBJECT MODEL

(89)Which of the following can be used to control the web browser?


(A) JavaScript (B) Function (C) Frame (D) Window
(90)What is used to control the web browsers window or the web page?
(A) COM (B) MOV (C) BMO (D) BOM
(91)Which of the following are different parts or objects of the browsers?
(A) Functions (B) Browser Object Model (C) Script (D) Styles
(92)In BOM, what can we use to change the window or elements displayed in the browser?
(A) Properties and methods of object (B) Size of object
(C) Variables of object (D) Type of object
(93)Which browser object represents the browser window or individual frame within window?
(A) History (B) Document (C) Window (D) Location
(94)What is controlled by the methods and properties of the window object?
(A) Web page (B) Web browser window (C) Web site (D) Functions
(95)What is controlled by the methods and properties of the document object?
(A) Web browser window (B) Functions (C) Web site (D) Web page
(96)Which is the global object of the browser object model?
(A) Window (B) Document (C) History (D) Top
(97)Which is the most important object in the browser object model?
(A) Parent (B) Document (C) Link (D) History
(98)Which object is used to reference each element in a form?
(A) Element (B) Document (C) Top (D) Self

THE FOCUS METHOD

(99)Which method is used to apply focus on a particular element of the form?


(A) Select (B) Load (C) Focus (D) Click

isNaN( )

(100)Which built-in function of JavaScript is commonly used to work with numeric values?
(A) Number( ) (B) isNumber( ) (C) isString( ) (D) isNaN( )
(101)What will be the output of isNaN(123)?
(A) Error message (B) No output (C) 123 (D) False
(102)What will be the output of isNaN(“hello”)?
(A) Hello (B) True (C) Error message (D) No output
(103)Which of the following is a scripting language that allow us to add logical aspects to our web pages?
(A) JavaScript (B) VB Script (C) HTML (D) Event

Most Important Questions

1. What is the full form of CSS?


(A) Case Study Sheet (B) Computer Style Sheet
(C) Cascading Style Sheet (D) Computerized Spread Sheet
2. Which option describes the style of the elements in the document and not its contents?
(A) CSS (B) Web browser (C) HTML (D) Both A & C
3. Which are the main parts of CSS rule?
(A) A Selector and one or more preference
(B) A Property and one or more values
(C) A Selector and one or more declarations
(D) None of these
4. Which button should be selected in the composition toolbar to apply CSS styles?
(A) Cascade (B) CSS (C) HTML elements (D) Style
5. Which program does not support some of the style features?
(A) Panel (B) Status bar (C) Browser (D) Editor
6. Which scripting language allows us to add programming aspects to our web pages?
(A) VB Script (B) C++ (C) JavaScript (D) Java
7. Which is used to improve the design in web pages and validate the forms?
(A) JavaScript (B) HTML (C) CSS (D) HTML Forms
8. Which can add interactivity to HTML pages?
(A) CSS (B) JavaScript (C) HTML (D)Frames
9. Which of the following is used to create HTML content dynamically?
(A) Web server (B) JavaScript (C) CSS (D) Web Browser
10. Which is the most common form of JavaScript today?
(A) Client side script (B) Server side script (C) Both A & B (D) VB Script
11. Which symbol is used as a mark of separation or termination?
(A) Colon (B) Dot (C) Comma (D) Semicolon
12. Which symbols are used to start and end a block?
(A) ( ) (B) [ ] (C) { } (D) “ “
13. A reusable block of code that performs a particular task is called…..
(A) Script (B) Function (C) Style sheet (D) Web page
14. Which function takes the text and displays it in an alert box?
(A) Alert( ) (B) write( ) (C) display( ) (D) Show( )
15. By using which statement, it is possible to return function value?
(A) Document.write( ) (B) Return (C) Showvalue( ) (D) Display( )
16. What will be generated by browser, when the interaction between the user and the web page occur?
(A) Action (B) Method (C) Event (D) Interaction
17. Which event would occur when user clicks on a form element?
(A) Focus (B) Change (C) Click (D) Reset
18. With which event, form fields are reset to default values?
(A) Change (B) Select (C) Reset (D) Error
19. Which event would occur when user submits a form?
(A) Submit (B) Reset (C) Both A & B (D) Load
20. With which keyword we can declare a variable?
(A) Var (B) Script (C) CSS (D) HTML
21. Which conditional statement is used to change the flow of the program?
(A) Script (B) If (C) Function (D) Method
22. Why the conditional statement if is used?
(A) To declare variable (B) To create function
(C) To change the flow of program (D) to break the program
23. Which is the global object of the browser object model?
(A) Window (B) Document (C) History (D) Top
24. Which is the most important object in the browser object model?
(A) Parent (B) Document (C) Link (D) History
25. Which built-in function of JavaScript is commonly used to work with numeric values?
(A) Number( ) (B) isNumber( ) (C) isString( ) (D) isNaN()

You might also like