RSCD
Chapter - 2
Cascading Style Sheets and Java Script
1. allows us to specify styles for the visual elements of the website.
a) CSS b) HTML c) HTTP d) SET
2. helps us to keep the information content of a document separate from
the details of how to display it, which is known as style.
a) CSS b) HTML c) HTTP d) SET
3. Which language is used to describe the information content of the document and
not the style?
a) HTML b) C++ c) C d) Java
4. describes the style of the elements in the document and not its contents.
a) CSS b) HTML c) HTTP d) SET
5. Using............, we can control the font types, font and elements colors, pad spaces,
margins and positions in our website.
a) CSS b) HTML c) HTTP d) SET
6. Which is known as the special symbol in the syntax of CSS?
a) Rules b) Separator c) Functions d) variables
7. A CSS rule has.................main parts.
a) a selector b) one or more declarations c) select d) both a and b
8. The......................is the HTML element on which the user wants to apply the style.
a) selector b) Declaration c) HTML d) CSS
9. consists of a property associated with HTML element used in selector
and its corresponding value.
a) Declaration b) Selector c) CSS d) HTML
10. In the declaration, the property and value are separated with ……… sign and
surrounding with
……………….brackets.
a) : (colon) , { } curly b) ; (Semicolon) , <> Angular
c) , (comma) , ( ) Circle d) None
11. The syntax of CSS.
H1 { color : green }
Selector Property Value
1
RSCD
12. KompoZer uses CSS by default, But when it is not selected then Click
…………….and select the checkbox “Use CSS Styles instead of HTML elements
and attributes”.
a) Edit --> Preferences b) Insert Preferences c) Tools Preferences d) None
13. Cascade button is available on the..........................toolbar.
a) Format 1 b) Format2 c) composition d) Status
14. When the user selects the internal style sheet option from the CSS stylesheet
dialog box, on the right side of the window, the user will see......................types of
various tabs.
a) general, Text, Background b) Borders, Box
c) Lists and Aural d) All of above
15. The..............tab has various styles like Font family, Font size, line height, color,
case, Alignment and many more.
a) Text b) Background c) General d) Borders
16. To set the background color, select the..............................tab from the CSS
stylesheet dialog box.
a) Text b) Background c) General d) Borders
17. If the user wants to keep an image in the background then in the Image option,
Click on………button and select the file for the background.
a) Choose file b) Browse c) select file d) download
18. To set the border, select the……… tab From the CSS stylesheet dialog box.
a) Text b) Background c) General d) Borders
19. Which option is selected when the user wants to apply the same border on all
the four sides from the CSS stylesheet dialog box?
a) “All four sides use same border style” b) Side use same border style
c) All two sides use same border style d) all border are same style
20. Which tab will show the CSS code (Source code) which is generated through the
user.
a) General b) Text c) Borders d) Background
21. To add the other elements, click on the arrow of...............button in the upper
left corner of the CSS stylesheet dialog box.
a) CSD b) CSS c) BDS d) HTML
22. allows us to set the format of the website without changing the
underlying structure.
a) CSD b) CSS c) BDS d) HTML
23. The disadvantages of CSS are the CSS..........................varies with different
browsers,
a) Compatibility b) Confidential c) Predefine d) All
2
RSCD
24. HTML only provides.........................web pages.
a) Static b) Dynamic c)simple d) Double
25. JavaScript provides.....................and interactive web pages.
a) Static b) Dynamic c)simple d) Double
26. A ………language is a simple, lightweight programming language that does not
contain the advanced programming functionalities of languages like C and Java.
a) scripting b) Action c) Assembly d) Machinery
27. is a scripting language that allows user to add programming aspects to
user's web pages.
a) C b) C++ c) Java d) JavaScript
28. is used in web pages to improve the design and validate the forms.
a) C b) C++ c) Java d) JavaScript
29. web browsers support JavaScript.
a) Firefox, Chrome b) Safari c) Internet Explorer d) All of above
30. What type of a script is JavaScript?
a) Application client side b) Application side
c) Client side d) user side
31. is used to validate the data entered in the HTML forms on the client
side before sending it to the server.
a) C b) C++ c) Java d) JavaScript
38. JavaScript can be placed inside the.....................section of an HTML page.
a) <body> b) <head> c) <title> d) Both a or b
39.From the following statement, “document.write (“HELLO”); Which is a method
that a part of the document object.
a) document b) write c) Hello d) None
40. In JavaScript, the statements are always end with the...................sign.
a) semicolon ( ; ) b) colon ( : ) c) coma ( , ) d) caret ( ^ )
41.Javascript statements can be grouped together in a block which starts and
ends with the …..bracket.
a) { } (curly) b) [ ] (square ) c) ( ) (Rounded) d) < > (Angular)
42. To add the script inside the <head> tag, user must open the..................view of a
page.
a) Design b) Source c) Split d) Normal
43. What is a reusable block of code that performs a particular task?
a) function ( routine) b) source c) rules d) variable
3
RSCD
44. A function is defined by the keyword …………
a) fun b) function c) FUN d) var fun
45. is useful in creating interactive web pages which responds to the action
performed by the user.
a) JavaScript b) HTML c) CSS d) DHTML
46.The interaction between the user and the web page causes the browser to
generate …………
a) event b) event handler c) Processor d) Function
.
47.When an event occurs, a specific JavaScript code is executed in response to a
given situation. This JavaScript code is known as………..
a) event handler b) event c) function d) block
48. A...................is a container for storing data.
a) variable b) function c) event d) event handler
49. Variables can stores..............type of data.
a) numbers b) strings c) text d) All of above
50. In JavaScript, we can declare a variable using...............keyword.
a) var b) variable c) v d) VAR
51. Java Script events :-
Event Description
abort Loading of image is canceled
blur Element such as a radio button becomes
inactive
click User clicks on a form element
change Value of a form field is changed by the
user
error Error occurs during loading of a document
or image
focus Element such as button becomes active
load Document or image is loaded
mouseout Mouse moves off the element
mouseover Mouse moves over the element
reset Form fields are reset to default values
4
RSCD
select User selects a form field
submit User submits a form
unload User leaves a page
55. The conditional statement......................is used to change the flow of the program.
a) if b) case c) for d) while
56. The ……statement evaluates an expression to validate specific condition.
a) if b) case c) for d) while
57. To control the web browsers window or the web page the user use the
……….model.
a) Browser Object Model (BOM) b) Browser Object Machine (BOM)
c) Browser oriented Model (BOM) d) Browser Objective Model (BOM)
58.All browsers are split into different parts or objects that can be accessed using
JavaScript. These parts are known as the ………….
a) Browser Object Model (BOM) b) Browser Object Machine (BOM)
c) Browser oriented Model (BOM) d) Browser Objective Model (BOM)
59. BOM represents the...................of entire browser along with the toolbar, menu,
status bar, web page and many more.
a) hierarchy b) single level c) liner d) multi level
60.The user does not have to create …………in a browser object model; which are
created automatically when the browser opens the web page.
a) object b) function c) variable d) block
61. object represents the browser window or individual frame within the
window which is created automatically by the browser.
a) Window b) document c) form d) variable
62. The....................object is the most important object in the browser object model.
a) Window b) document c) form d) variable
63. The.................object is used to represent the web page displayed in the browser.
a) Window b) document c) form d) variable
64.All the elements of the web page like forms, images, links and others are
contained within the..................object.
a) Window b) document c) form d) variable
65. The.................object is used by JavaScript to represent forms created using the
<form> element is within the document object.
a) Window b) document c) form d) variable
5
RSCD
66. The...........................object is used to reference each element in a form.
a) Window b) document c) form d) element
67. The....................object can be radio, text, checkbox or any other object.
a) Window b) document c) form d) element
68. method is used to apply focus on a particular element of form.
a) focus( ) b) load( ) c) function d) int( )
69. mark is an indication to the user that is a compulsory field which should
not be kept empty.
a) * (astrick) b) @ c) $ d) &
70. To work with numeric values, Javascript uses..........................function.
a) built-in b) user define c) default d) none
71. One of most commonly used numeric function ………………
a) isNaN() b) NaN() c) Is NaN() d) isN()
72. isNaN() function returns.............if the value is not-a-number.
a) True b) False c) yes d) no
73. isNaN() function returns…...........if the value is a number.
a) True b) False c) yes d) no
74. isNaN(123) function returns……… as the value “123” is a number.
a) True b) False c) yes d) no
75. NaN(“hello”) returns true as the value “hello” is not a number.
a) True b) False c) yes d) no
76. From the following which is the advantage of CSS?
a) CSS has less codes compared to that in HTML.
b) CSS makes website designing quick and efficient.
c) To change the style of an element only needs to make modifications in the CSS
file.
d) All of these
77.In following example of JavaScript document.write(“SWA SE SWACHHATA
TAK”); which is known as method?
a) document b) dot ( . ) c) write d) ( );
78. Javascript statements can be grouped together in a block and block starts and
end with which
brackets?
a) curly b) Square c) Round d) Angle
79. Which of the following is not an example of Event in JavaScript?
a) error b) load c) take d) focus
6
RSCD
80. Which of the following object comes under document object in the browser object
model?
a) Form, link b) Form, history c) Form, self d) Form, parent
81. In following JavaScript statement, var x=document.gseb.Eng.value; is given, where
which of the following indicates form name in Kompozer?
a) document b) gseb c) Eng d) value
82. Which of the following method sends the data as a block through the HTTP
transition?
a) PUT b) SET c) POST d) GET
83. Which of the following icon comes in composition toolbar at Kompozer?
a) Bullet b) Font c) Open d) Bold
84. Which of the following colored outline is inserted by Kompozer after defining form?
a) File name, Action URL, method b) Form name, Anchore name, methods
c) Force name, method URL, method d) Form name, Action URL, method
85. Which of the following dialog box is viewed when user click save button first time
in Kompozer?
a) Close all b) save all c) save as d) Page title
86. Which of the following element is used to create a drop down list or menu in a
form?
a) Drop b) Input c) Select d) Area
87. Which of the following is used for “OR” in JavaScript statement?
a) || b) && c) ;; d) **
88.Which of the following event is used in javascript for form fields to reset default
values?
a) reset b) changes c) abort d) load
89.What will be form name in Kompozer if variable x is defined in following way in
javascript?
var x = document.oct.month.values;
a) month b) value c) document d) oct
90. Which of the following is inbuilt function provided by javascript?
a) alert( ) b) valiform( ) c) hello( ) d) validate forms( )
91. Which of the following is a collection of interlinked webpages?
a) Kompozer b) form c) webpage d) Website
7
RSCD
92. In javascript, which event would occur when loading of image is cancelled?
a) blur b) load c) abort d) unload
93.In Kompozer, which option of „Table” tab of „Table properties‟ dialog box is used to
align the table as left, right or center?
a) size b) Border and spacing c) Table Alignment d) Caption
94. Which of the following toolbar is not available in Kompozer?
a) Preview b) Format Toolbar1 c) Format Toolbar2 d) Composition
95. In Kompozer, cascade button is available on which toolbar?
a) Edit mode b) Composition c) Format toolbar1 d) Format toolbar2
96.In browser object model, elements of webpage like forms, images, links etc. are
contained within which object?
a) history b) document c) location d) buttons
97. Which of the following is not a part of CSS syntax?
a) selector b) property c) value d) event
98.In „CSS stylesheets‟ dialog box of Kompozer, which tab is used to change the
color of a font?
a) General b) Text c) Background d) Lists
99.Which of the following statement is used to return a value in a function of
JavaScript?
a) return b) function c) select d) send
100. Which of the following statement is true for JavaScript variable?
i. Variables in JavaScript are case sensitive.
ii. Variable can store numbers, strings or text.
iii. Variables can be declared using “var” keyword.
a) Only ( i ) and ( iii ) b) Only ( ii ) and ( iii )
c) Only ( i ) and ( ii) d) ( i ), ( ii ) and ( iii )
8
RSCD
Textual Exercise
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. What is the syntax of CSS?
a) Selector { property : value } b) select { property : value }
c) selector { value : property } 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) Action Script b) JavaScript c) HTML d) CSS
9. Which of the following tag is used to insert JavaScript code into an 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
9
RSCD
13.Which of the following is generated by the browser due to interaction between the
user and the web page?
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. What of the following is 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 Modelling d) Browse Object Model
17. Which of the following is the top level object in the BOM?
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