Chapters Covered: Ch.1 – Advanced Web Designing | Ch.2 – Introduction to SEO | Ch.3 – Advanced JavaScript
- JavaScript is an __________ scripting language that executes its instructions directly without compiling.
- __________ script resides on the web server and is executed there.
- The __________ statement is used to jump out of a loop early.
- DOM stands for __________ .
- The __________ object is at the very top of the object hierarchy in JavaScript and is the parent of all other objects.
- The
lengthproperty of the String object returns the __________ of characters in a string. Math.ceil()returns the next integer __________ than or equal to a given number.- CSS stands for __________ .
- The
<iframe>element creates an __________ frame. - SEO stands for __________ .
- __________ are links on one website that, when clicked, take the user to another site.
- The
<map>tag has only one attribute called __________ . - An image with multiple hyperlinks is called an __________ .
- The __________ type of CSS stylesheet uses the
<link>tag inside the<head>section of every page. - The
onblurevent occurs when a user __________ focus of an element.
- JavaScript is a case-sensitive language.
Math.ceil()returns the nearest integer less than or equal to a given number.- The
MAX_VALUEproperty of the Number object returns the smallest possible value. getDay()method of the Date object returns the month in number.- The
onKeydownevent occurs when the user moves the mouse pointer. - Client-side scripting is more secure than server-side scripting.
- JavaScript is a platform-independent scripting language.
- The
defaultstatement in aswitch-caseblock is mandatory. - HTML5 is currently used because it supports mobile technology.
- A CSS file must be saved with a
.cssextension. - The
<meta>tag is placed between<body>and</body>tags. - An unordered list can be numerical or alphabetical.
- White Hat SEO techniques are approved by search engines.
- The
<audio>element supports thecontrolsattribute to display play/pause buttons. parseInt()converts a given string into a floating-point number.
Q1. JavaScript is a __________ language.
- a) Compiled
- b) Interpreted
- c) Assembly
- d) Machine-level
Q2. Which window method displays a dialog box with OK and Cancel buttons?
- a)
alert() - b)
prompt() - c)
confirm() - d)
open()
Q3. Which is the correct syntax for a for loop in JavaScript?
- a)
for(condition; initialization; iteration) - b)
for(initialization; condition; iteration) - c)
for(iteration; condition; initialization) - d)
for(initialization; iteration; condition)
Q4. The innerHTML property is primarily used to:
- a) Apply CSS styles to HTML elements
- b) Get or change the content of an HTML element
- c) Add new sibling elements
- d) Delete HTML elements permanently
Q5. Which character is used to define an ID selector in CSS?
- a)
% - b)
$ - c)
@ - d)
#
Q6. The <ol> tag defines a/an:
- a) Unordered list
- b) Definition list
- c) Ordered list
- d) Nested list
Q7. Which attribute of the <img> tag is used to link a client-side image map?
- a)
src - b)
alt - c)
usemap - d)
href
Q8. Which CSS property defines the flow of content around elements?
- a)
position - b)
display - c)
float - d)
margin
Q9. Which <input> type defines a color picker in HTML5?
- a)
<input type="text"> - b)
<input type="color"> - c)
<input type="range"> - d)
<input type="image">
Q10. Which file tells the search engine which pages to exclude from indexing?
- a)
index.html - b)
sitemap.xml - c)
robots.txt - d)
seo.txt
Q11. Which of the following are valid methods of the JavaScript Date object? (Choose 2)
- a)
setTime() - b)
getValidTime() - c)
getTime() - d)
setValidTime()
Q12. Which of the following are properties of the Document object? (Choose 2)
- a)
URL - b)
title - c)
name - d)
status
Q13. Which of the following are event handlers used with the text/input object in JavaScript? (Choose 2)
- a)
onBlur - b)
onMove - c)
onFocus - d)
onAction
Q14. Which of the following are types of CSS? (Choose 2)
- a) Inline
- b) External
- c) Circular
- d) Dynamic
Q15. Image maps are of two types. Which of the following are correct? (Choose 2)
- a) Network Side
- b) Client Side
- c) Computer Side
- d) Server Side
Q16. Which of the following are correct methods of the Window object? (Choose 3)
- a)
write() - b)
alert() - c)
writeln() - d)
close() - e)
open() - f)
charAt()
Q17. Which of the following are features of JavaScript? (Choose 3)
- a) Supports event-based programming
- b) Is a platform-dependent language
- c) Is a case-insensitive language
- d) Provides inbuilt objects
- e) Can handle date and time effectively
- f) Requires special software to run
Q18. Which of the following are inbuilt objects in JavaScript? (Choose 3)
- a) Time
- b) Date
- c) Inheritance
- d) Array
- e) Number
- f) Function
Q19. Which of the following are attributes used with the <audio> tag? (Choose 3)
- a)
autoplay - b)
href - c)
controls - d)
cntrl - e)
loop - f)
bgsound
Q20. Which of the following are CSS positioning types? (Choose 3)
- a) Static
- b) Fixed
- c) Absolute
- d) Position
- e) Dynamic
- f) Nested
| Column A | Column B |
|---|---|
1. ceil() |
a) Writes HTML expressions or JavaScript code to a document |
2. floor() |
b) Sets focus to the current window |
3. write() |
c) Removes whitespace from both sides of a string |
4. focus() |
d) Returns the next integer greater than or equal to a given number |
5. trim() |
e) Returns the next integer less than or equal to a given number |
| f) Removes focus from the current window | |
| g) Displays an alert box with an OK button |
| Column A | Column B |
|---|---|
1. <ul> |
a) Used to indicate a client-side image map |
2. usemap |
b) A CSS property |
3. color |
c) Creates a bulleted list |
4. <img> |
d) Defines an image as a submit button |
5. <input type="image"> |
e) Inserts an image on a web page |
| f) Creates an ordered list | |
| g) Defines a server-side image map |
Q21. State three differences between client-side scripting and server-side scripting.
Q22. What is the Window object in JavaScript? State any two methods of the Window object with their descriptions.
Q23. What is DOM (Document Object Model)? Name any three properties or methods of the Document object.
Q24. Define SEO. State the two types of SEO with a brief explanation of each.
Q25. Explain the float property in CSS. State its three types with a brief description of each.
Q26. Write an event-driven JavaScript program embedded in an HTML page that:
- Accepts a number from the user via a text box
- Displays the multiplication table (1 to 10) of that number when a button is clicked
- Uses a
forloop to generate the table
Q27. Write an HTML5 program that:
- Creates a form to accept Name (
<input type="text">), Email (<input type="email">), and Date of Birth (<input type="date">) from the user - Includes a Submit button
- Applies internal CSS so that the form heading has a background color, a different font family, and centered text alignment
End of Question Paper
Mark Distribution Summary
| Section | Type | Questions | Marks Each | Total |
|---|---|---|---|---|
| A | Fill in the Blanks | 15 | 1 | 15 |
| B | True or False | 15 | 1 | 15 |
| C | MCQ – 1 Correct | 10 | 1 | 10 |
| D | MCQ – 2 Correct | 5 | 2 | 10 |
| E | MCQ – 3 Correct | 5 | 3 | 15 |
| F | Match the Following | 2 sets (5 each) | 1 per sub-q | 10 |
| G | Brief Answers | 5 | 3 | 15 |
| H | Coding Practical | 2 | 5 | 10 |
| Total | 100 |
Answer Key – XII IT Question Paper (100 Marks)
Section A – Fill in the Blanks
break<map>tag)Section B – True or False
ceil()rounds up (≥ given number);floor()rounds downMAX_VALUEreturns the largest maximum valuegetDay()returns day of the week (0–6), not the monthonKeydownfires on a key press, not mouse movement<meta>is placed between<head>and</head>tagscontrolsattribute "displays play/pause button etc."parseInt()converts to integer;parseFloat()converts to floatSection C – MCQ (1 Correct)
confirm()for(initialization; condition; iteration)#usemap<Img>usemap attribute)float<input type="color"><input>elements table)robots.txtSection D – MCQ (2 Correct)
setTime()and c)getTime()URLand b)titleonBlurand c)onFocusSection E – MCQ (3 Correct)
alert(), d)close(), e)open()autoplay, c)controls, e)loop<audio>tag table)Section F – Match the Following
Set 1 – JavaScript Methods
ceil()floor()write()focus()trim()Set 2 – HTML/CSS Terms
<ul>usemap<Img>usemap)color<img><Img>description)<input type="image"><input>elements table)Section G – Brief Answers (Model Answers)
alert()– displays alert box;confirm()– OK/Cancel box;prompt()– gets input;setTimeout()– calls function after milliseconds;open()– opens new window etc.head,title,URL,body. Methods:write(),writeln(),getElementById().Section H – Coding Practical (Model Answers)
Q26 – Multiplication Table using For Loop
Source: Ch.3, Pg. 38 (Program for loop – similar table program)
Q27 – HTML5 Form with Internal CSS
Source: Ch.1, Pg. 1–2 (HTML5 advanced
<input>elements – email, date, text) + Pg. 5–6 (Embedded/Internal CSS + CSS Properties)End of Answer Key