Iii. Web App Answers
Iii. Web App Answers
Iii. Web App Answers
1
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
23. JavaScript objects are simply collections of name-value pairs where the name part is a
JavaScript (b) expression.
24. Output: The function mFun adds x, y, and NaN. Since any operation involving NaN results in NaN,
the output will be NaN.
25. A c. data type is a classification of the type of data that a variable or object can hold.
26. PSD stands for Photoshop Document.
27. Snippets can be inserted only in split or code view.
28. Which of the following is not a scripting language? d. Basic
29. IntelliSense feature automatically provides a list of codes and attributes as a popup when you
work in the a. Code View mode.
30. Details collected from a form are saved in a b. Database with corresponding fields.
31. DWT Full Form is Dynamic Web Template
32. KompoZer and Dreamweaver are c. Web authoring tools.
33. JavaScript users can get and set properties of an object using the dot (.) or bracket ([])
operator.
34. Search engines crawl a website and hence are referred to as spiders.
35. Math.round(-20.51) results in -21.
36. If A = 10 and B = 25, the output of A && B is TRUE because both A and B are non-zero values.
37. An example of a loop in JavaScript is do-while.
38. JavaScript variables are “containers” for storing information.
39. JavaScript was developed by Brendan Eich.
40. Document Object Model - DOM stands for Document Object Model.
41. Variables in JavaScript can be declared using var.
42. % in JavaScript is an example of an arithmetic operator.
43. Numbers in JavaScript are double-precision 64-bit format.
44. The extension that identifies a picture file is .png.
45. A comparison operator in JavaScript is ==.
46. Search engines search contents of a web page and create indexes to display results.
47. The Collection Pane displays our collection folders, which contain clips.
48. AVI stands for Audio Video Interleaved.
49. The playback indicator can be dragged on the seek bar to the exact spot where you want to split
the clip.
50. a. View - The preview monitor can be made larger or smaller by clicking View.
51. The extension that identifies a video file is .avi.
52. We can upload a file to a web server using a protocol called FTP.
53. The object tag conforms to the W3 standard and helps to achieve standardization across the
World Wide Web.
54. A JavaScript arithmetic operator is %.
55. To use random() in JavaScript, the syntax is Math.random().
56. The output of the JavaScript code var name=["Red", "Blue", "Yellow", "Green"];
name.pop() will be “Green”.
57. In JavaScript, if a variable is defined using var in a compound statement “if”, it will be visible to
the entire compound “if” statement.
58. To use an object’s methods or properties, we write the object’s name, a dot (.), and then the
method/property name.
59. Multimedia refers to any type of application or presentation that involves more than one type
of media, such as text, graphics, video, animation, and sound.
60. A smaller version of an image is called a thumbnail.
61. Web publishing means publishing the web pages.
62. (iv) All of the above - JavaScript is used for client-side applications, data validation, and
creating interactive forms.
63. (i) By adding text-based information to your movie - Titles and credits let you enhance your
movie by adding text-based information.
64. (i) Quality of traffic - SEO is used to improve the volume and quality of traffic to a website from
search engines.
2
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
65. The term “Sandbox” in SEO refers to (ii) This is where sites are kept till they get mature
enough to be included in the top rankings for a particular keyword -
66. (a) Press and hold Ctrl key while selecting clips - To select non-consecutive clips in Windows
Movie Maker/Video Editor.
67. A raster image format is composed of a field of pixels, each characterized by a color.
68. varTxt.toUpperCase() - This statement will display the string in uppercase.
69. No - .avi is not an image file format; it is a video file format.
70. The inbuilt JavaScript function that can be used to join the two arrays is concat(). Example: var
combined = fruits.concat(vegetables);.
71. View > Site > Size - To know the size occupied by files in a website, open the website and select
View > Site > Size.
72. The name of actors is ideally displayed at the end as credits.
73. The extension of a standard Macintosh image file is .pict.
74. The <BGSOUND> tag can be used only in Internet Explorer to include an audio file.
75. The FTP feature is used to transfer contents of your entire website to a remote computer.
76. If a variable is declared without assigning any value, its type (datatype) is undefined.
77. Consistency - One advantage of DWT (Dynamic Web Template) is that it ensures consistency
across multiple web pages.
78. SEO (Search Engine Optimization) - SEO is the process that affects the website visibility or
ranking while displaying search results.
79. The Preview Monitor is the area of Windows Movie Maker which enables you to view
individual clips or the entire project before publishing it as a movie.
80. Google -is a popular search engine.
81. GIF is a lossless image format.
82. The output of the code snippet document.write(Math.round(5.319)) is 5.
83. isFinite() in JavaScript is used to determine whether a value is a finite number. It returns true if
the value is finite, and false if the value is NaN, Infinity, or -Infinity.
84. One desktop publishing program is Adobe InDesign.
85. The Collections pane in Windows Movie Maker displays the folders containing clips.
86. True - The term “rich media” is synonymous with interactive multimedia.
87. The output of the JavaScript statements will be “Hi” because both conditions (A > B) and (B >
C) are true.
88. One video streaming application that allows video embedment is YouTube.
89. The method in JavaScript that allows joining all elements of an array into a string is join().
90. One Page Transition effect that can be used on web pages is Fade.
91. NaN + 5 results in NaN.
92. b. List is not a valid datatype in JavaScript.
93. c. .mp3 is an example of an audio file.
94. The Zoom Timeline appears as a magnifying glass with a (+) sign in it.
95. The Document object uses the write() method to output some text to the page-document.
96. The output of the JavaScript statement parseInt("345", 10) is 345.
97. a. pop() method in JavaScript removes and returns the last item.
98. Two functions associated with Stack in JavaScript are push() and pop().
99. The function used to find the length of a given string in JavaScript is length.
100. Ramesh can use the typeof command/function in JavaScript to find the datatype of the
variable.
101. The type of attribute in the <script> tag specifies the scripting language of the script. For
example, type="text/javascript".
102. Logical - && is a type of logical operator in JavaScript.
103. The output of the code NaN + 5 is NaN.
104. A statement in JavaScript to declare a variable ‘Sum’ and initialize it with 10 is:
JavaScript
var Sum = 10;
105. for (var i=0; i<=5; i++)
{ ……..
3
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
}
The loop will run 6 times.
106. Examples of two logical operators are && (AND) and || (OR).
107. IntelliSense is a code-completion aid that includes a number of features: List Members,
Parameter Info, Quick Info, and Complete Word.
108. IIS stands for Internet Information Services.
109. Information collected from web-based forms can be stored in a database with appropriate
fields for every entry in the form.
110. b) 32-bit and 64-bit - Virtual Dub is a video capture/processing utility for 32-bit and 64-bit
Windows platforms.
111. b) ZS4 video Editor - ZS4 video Editor aims to provide media experts with a facility to
combine a variety of media types into one or more output files.
112. a) General Public License - All open-source software(s) are available under GNU General
Public License.
113. c) Wax - Wax can work in two modes - as a standalone application and as a plug-in.
114. d) Avidemux - Avidemux is the video editing software in which tasks can be automated
using projects, job queue, and powerful scripting.
115. c) Both i) and ii) are correct - Both statements about Moviestorm are correct.
116. i) V-Dub is not primarily an AVI editor - This statement is correct.
117. The false statement is i) VideoSpin is an image processing software1.
118. b) AVI Trimmer - AVI Trimmer is a free video editor for fast and lossless AVI editing.
119. a) preview monitor - The preview monitor enables us to view individual clips or an entire
project before publishing it as a movie in Windows Movie Maker.
120. b) Easy HTML5 Video - Easy HTML5 Video is developed to convert videos into HTML5
supported WebM, MP4, and OGG formats.
121. b) MixPod - MixPod creates a free flash widget to embed into our site.
122. c) ii) and iii) correct - The appropriate options to embed the file ‘music.wav’ in the web
page with width 100 pixels and height 200 pixels using the object tag are:
HTML
<object data="music.wav" type="audio/x-mplayer2" width="100" height="200">
<object src="music.wav" type="audio/x-mplayer2" width="100" height="200">
123. ii) Motion Picture Experts Group - MPEG stands for Motion Picture Experts Group.
124. FLC is an Autodesk Flick movie and is a raw, uncompressed series of frames.
125. The file format of an audio file is .mid.
126. EPSI stands for Encapsulated Post Script with preview image.
127. The vector image file format from the following is .ps.
128. A .epsi file can be either raster or vector depending on the program that created it.
129. The correct sequence of steps to embed Flash video in Dreamweaver is Insert -> Media –
> Flash.
130. The tags used to add audio files to a webpage is <embed> and <object>
131. Quick Media Converter is another Windows-based converter for audio and video.
132. ECMA is an international standard organization for information and communication
systems.
133. Image transfer is not a feature of a movie editing tool.
134. Virtual Dub is a video capture/processing utility for 32-bit and 64-bit Windows
platforms.
135. Cinefx is an offline playback, editing, encoding, animation, and visual effects tool based on
the Jahshaka technology.
136. Blender is the free open-source 3D content creation suite, available for all major operating
systems under the GNU General Public License.
137. Moviestorm is the complete 3D movie-making software application for all abilities.
138. Multimedia is the media that uses multiple forms of information content and information
processing.
139. The term “rich media” is synonymous with interactive multimedia.
140. The most common way to discover the type of a file is to look at the file extension.
4
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
141. swf, .wav, .mp3, and .mp4 are examples of movie/multimedia files.
142. A raster image is one composed of a field of pixels, each characterized by a color, and is
usually created in paint programs.
143. GIF is an example of a lossless image file format.
144. A Pict file is a standard Macintosh image file format and can be either a raster image or a
vector image, depending on the program that created it.
145. MIDI is an acronym for Musical Instrument Digital Interface.
146. Video LightBox is a wizard program for Windows and Mac that helps users easily insert
video to the website or blog, in a few clicks without writing a single line of code.
147. The <object> tag is the web standard for embedding content onto a web page.
148. The correct sequence of steps to split a movie is: c) 4) -> 3) -> 2) -> 5) -> 1)
149. b) 2-A, 1-C, 3-B
The correct option is:
1 Task Pane - C lists the common tasks.
2 Timeline - A Provides a more detailed view of the movie.
3 DVD Knife - B The clips will be stored in VOB format only.
150. c) ii) is correct - Lossy formats lose resolution (sharpness) when converted to, while
lossless formats preserve image information.
i)- B, ii)- C, iii) - A - The correct match is:
i) Sound File - B .qt (Quick Time)
ii) Flash File - C .swf
iii) multimedia - A Multiple forms of media
151. The correct option is c) Both 1 and 2 are correct.
✓ A MIDI file works over the web as a program that runs the sound card.
✓ A MIDI file is not simply read and reproduced like a .wav or an .au file. Instead, it tells the
sound card what note to produce and for what duration
152. Identify the type of operators:
i) *, /, + - Arithmetic operators
ii) >>, >>> Bitwise operators
iii) <, >=, >, == Comparison operators
153. b. Stress is a state of feeling upset, annoyed, and hopeless:
154. Reeta keeps detached and aloof, and is prone to introspection and fantasy. She shows little
interest in forming personal relationships and seems to be emotionally cold. Identify the
type of personality disorder: Schizoid Personality Disorder
155. Virtual Dub lacks Editing power of a general-purpose editor:
156. While creating a movie, credits should be added at the End of a movie:
157. Free Studio a single package which bundles all free software from DVD Video Soft to
work with DVD:
158. .PS image files are PostScript graphics file format:
159. An FLC is an Autodesk Flick movie and is a : b. raw, Uncompressed series of frames
160. Krishh has written the following code to display an object with the name “controller”. His
senior has instructed him to rewrite the code so that the object controller is not displayed
in the browser: HTML <param name="controller" value="false" />
161. Only d. Microsoft Internet Explorer supports the <object> tag for sound:
162. Name the default view in Movie Maker: Storyboard
163. c. Wax can create 2D & 3D special effects and can work in two modes – as a standalone
application and as a “plug-in”:
164. Give examples of any two multimedia elements: Text and Images
165. Brij wants to run the sound file again and again forever. Which of the following attributes of
the Embed command should be set to True to do so: c. Loop
166. The new <video> tag in HTML5 markup allows web developers to add videos into a web
page without any special plugins:
167. If we don’t want to outsource video hosting to third-party websites, it’s possible to make a
video web-ready with the help of Freemake Video Converter from Freemake.com:
168. Free Video Coding is an online service that helps us to create a b. web video player
5
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
169. Windows Movie Maker is a feature of a. Windows Vista that enables us to create home
movies and slide shows on our computer, complete with professional-looking titles,
transitions, effects, music, and even narration:
170. b. Video LightBox is a wizard program for Windows and Mac that helps users easily insert
video to the website or blog, in a few clicks without writing a single line of code:
171. VirtualDub has capabilities for processing large numbers of files and
can be extended with third-party video filters. True/false: b. batch processing
172. WAX can create 2D & 3D special effects and can work in two modes – as a standalone
application for home users/beginners, and as a “plug-in” to video editors/NLEs for
professional editors.
173. Select the appropriate video editing tools that can capture video by a number of ways,
including one-frame-per-minute (web camera. option, workaround 2 GB file size limit, send
the videos to printer, heavy compress it and post to the webpage. c. AVIedit.
174. c. DVDKnife is the simplest and fastest tool in its category with the ability to extract long
VOB clips in a few seconds.
175. In Movie Maker, we can drag clips, transitions, or effects from the Content Pane. The option
not seen in the Content Pane of Windows Movie Maker is: c. folders.
176. The acronym AVI stands for Audio Video Interleave.
177. The statement that is not true about multimedia is: c. Multimedia is similar to traditional
media like fine art.
178. Search engines crawl a website and hence are referred to as spiders or web crawlers.
179. Search engines index various components of a web page. Two components are: Title tags
and Meta descriptions
180. The term SEO stands for Search Engine Optimization.
181. One method used by web hosting providers to upload a website is FTP (File Transfer
Protocol).
182. Once a website is published, it is available d. 24X7 (all the time) for its visitors to view.
183. Two web authoring tools are Adobe Dreamweaver, Microsoft Word
184. The file “Solarenergy.mp3” is a multimedia file.
185. The option that is not a web browser is: c. EPS.
186. GIF is a lossless image file format, while JPEG is a lossy image file format.
187. Movies consist of a series of b. still images, sometimes with embedded audio information.
188. The program over the web that runs a sound card is: a. midi file.
189. .cgm (Computer Graphic Metafile) is an example of a Vector graphic.
190. Free Video Coding is an online service that helps us to create a b. web video player.
191. SEO (Search Engine Optimization) refers to the process that affects the website visibility
or ranking when displaying search results.
192. d. Link with Source. Is the feature of MEW used to update the image whenever the original
image is updated.
193. While designing a web page, a proper balance must be maintained between: b. visual
design and code.
194. In order to have fixed positions for common elements and modifiable designated portions on
each web page, one can use: b. Dynamic Web Template.
195. Every form should have a c. submit button to input the data entered in a form to the server.
196. Description can be added to a web page using b. META tags.
197. True. Movica will work with .wmv, flv, rm, and .mpg files, making it more versatile than
VirtualDub.
198. Which of the following is not movie editing software? JavaScript and HTML
a. DVD Knife is a simple tool for extracting DVD clips from DVDs. The clips are stored only
in VOB format.
b. AVI Trimmer is a free video editor for fast and lossless AVI editing.
c. JPEG stands for Joint photographic experts group
d. Files with .voc extension are the Sound files.
e. Each video on Facebook has an id which shown in the URL or Uniform Resource
Locator.
6
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
199. c) Storyboard can be used to look at the sequence or the ordering of the clip in your project
and easily rearrange them.
200. PDF stands for d. Portable Document Format.
201. +“42” will produce the following output: (b)42
202. A file with extension .mp4 can contain just sound and no video.
203. a) Zwei-Stein Video Editor is a freeware non-linear, non-destructive video compositing and
editing system.
204. The conditional operator is: d) ?:
205. The option that is not a web browser is: d) Photoshop.
206. .avi is a file extension for (a) Video files1.
207. To import consecutive clips in Movie Maker, click the first video clip in the list, press and
hold down the CTRL key.
208. Application software that handles the post-production video editing of digital video
sequences on a computer are called video editing software.
209. VirtualDub is a video capture/processing software, licensed under (b) GPL.
210. Cinefx is an offline playback, editing, encoding, animation, and visual effects tool based on
the Jahshaka technology.
211. The software meant for editing the kind of movies that Virtual Dub cannot is Adobe
Premiere Pro.
212. XML stands for (b) Extensible Markup Language.
213. .gif, .tga, .ps are examples of (c) image files.
214. MIDI stands for (d) Musical Instrument Digital Interface.
215. True. VirtualDub has batch processing capabilities for processing large numbers of files and
can be extended with third-party video filters.
216. The ii) Task Pane lists the common tasks that may be needed to perform while making a
movie, including importing files, editing, and publishing the movie.
217. The default view of Windows Movie Maker is Storyboard.
218. Movie Editing tools are editing software and are also known as application software which
handle the post-production video editing of digital videos.
219. Anaam Hashmi expressed concerns about the negative impact of multimedia on the web.
220. A lossless image file format is PNG.
221. SEO stands for Search Engine Optimization.
222. d. Tasks Pane lists the common tasks that may be needed to perform while making a movie,
including importing files, editing, and publishing the movie.
223. NLE stands for b. Non Linear Editing.
224. c. Blender is a free open-source 3D content creation suite available under GNU license
225. c. Animation can be considered as multimedia.
226. The extension that identifies a webpage is a. .html.
227. c. Movie Storm is the complete 3D movie-making software application for all abilities and it
allows creating excellent animation effects.
228. Atomic Learning’s Video Editor is a free movie editing tool designed to give teachers and
students the ability to enter short titles and descriptions, complete with planned length and
edited order.
229. A file with an extension .jpeg indicates that it is an image file.
230. Vector is a type of image format that does not consist of pixels, but objects such as curves,
shades, and characters.
231. The type of operator in the statement a != b is: b. Comparison.
232. On execution of the code <param name = "controller" value = "False"/>, the object controller
is not displayed in the browser.
233. During web designing, in Design mode, the IntelliSense feature provides you a list of codes
and attributes as a pop-up.
234. a. Preview Monitor enables us to view individual clips or an entire project in Windows
Movie Maker.
235. AVI stands for b. Audio Video Interleaved.
236. Movie editing tools are editing software and an example of c. Application Software.
7
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
237. The option that cannot be considered as multimedia is: a. Plain Text.
238. The extension that identifies a style sheet file is: b. .css.
239. The process of tweening in animation is similar to the video concept of in-betweening.
240. The movies that rely upon computer animation for all of their images are: d. All of the
above (The Incredibles, Shrek, Toy Story).
241. For non-linear video editing, video and audio clips are stored on: d. Hard Disk.
242. The least expensive way to solve the problem of storage space for short digital movies is: b.
Use data compression.
243. The reason for MP3 being a popular format for music file sharing is: c. MP3 compression
reduces file sizes considerably with minimal loss of music quality.
244. iii. Storyboard is the default view in Windows Movie Maker.
245. WMV stands for iv. Windows Media Video.
246. (i) DVD Knife is a simple tool to extract long VOB clips in a few seconds.
247. The WHAM program can be used (iv) To play sound files.
248. SEO (Search Engine Optimization) refers to the process that affects the website visibility
or ranking when displaying search results.
249. The feature of MEW used to update the image whenever the original image is updated is: d.
Link with Source.
250. While designing a web page, a proper balance must be maintained between: b. visual
design and code.
251. In order to have fixed positions for common elements and modifiable designated portions on
each web page, one can use: b. Dynamic Web Template.
252. Every form should have submit button to input the data entered in a form to the server.
253. Description can be added to a web page using b. META tags.
254. Variables in Java Script can be defined using var keyword.
255. A data type is a classification of the type of data that a variable or object can hold.
256. Numbers in Java Script are in double precision 64-bit format.
257. There is a built in object called Math to handle more advanced mathematical functions and
constants in JavaScript.
258. Bitwise NOT operator operates by reversing all bits in the opened.
259. The statement that is false with respect to JavaScript is: a. JavaScript is Object Oriented
programming language.
260. In JavaScript, objects are just collections of b) Name-value pairs.
261. DOM stands for b) Document Object Model.
262. The c) <script> tag alerts the browser about the scripting language JavaScript.
263. d) Relational Operators are examples of !=, <, >, >=.
264. The incorrect statement is: b. JavaScript can do some processing of forms but cannot
validate user input when the user submits the form.
265. The output of the following code:
JavaScript
<script type="text/javascript">
document.write("<i>Hello World!</i>");
</script>
is: c) Hello World!
266. The correct statements about Windows Movie Maker are: d) i), ii) and iv) are correct.
267. The extension of JavaScript files is: b) .js.
268. c) >>> is called the Bitwise Shift Right with Zero Operator, where the bits shifted in on the
left are always zero.
269. c) parseInt() is used to convert a string to an integer.
270. The output of parseInt("011", 8) would be: b) 9.
271. The extension for Photoshop files is: c) .psd.
272. a) Page Transition are the special effects that can be applied to a web page just like any
presentation software.
273. DWT stands for: c) Dynamic Web Template.
274. The correct option is: c) Both statements are correct.
8
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
9
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
10
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
15. Multimedia:
▪ Multimedia refers to content that uses a combination of different forms such as text, audio,
images, animations, video, and interactive content.
16. Embedding MP3 file using <object> tag:
HTML
<object data="music.wav" type="audio/mpeg">
<param name="autoplay" value="true">
</object>
17. AUTOSTART attribute of <embed> tag:
▪ The AUTOSTART attribute specifies whether the embedded media should start playing
automatically when the page loads. For example, <embed src="music.mp3"
autostart="true">.
18. Difference between Client-side and Server-side JavaScript:
▪ Client-side JavaScript: Runs in the user’s browser, used for creating interactive web
pages.
▪ Server-side JavaScript: Runs on the server, used for backend processing and database
interactions.
19. Output of the following:
▪ A="Hardwork pays"
▪ var d = A.indexOf("pays") returns 9
▪ document.write(A.length) returns 13
20. Full form of PDF and explanation:
▪ PDF: Portable Document Format. It is a file format developed by Adobe that preserves the
formatting of a document across different devices and platforms.
21. Preview Monitor in Windows Movie Maker:
▪ The Preview Monitor allows you to view and edit your video clips before finalizing the
project.
22. Dragging clips or transitions from one project to another:
▪ You can drag clips or transitions from one project to another by selecting and dragging
them to the desired location. Changes made to the clips do not reflect in the source file.
23. Steps to create clips from a single existing video:
▪ Import the video into Windows Movie Maker.
▪ Use the “Split” tool to divide the video into smaller clips.
▪ Arrange and edit the clips as needed.
24. Compression of GIF and JPEG formats:
▪ Yes, both GIF and JPEG formats can be compressed. They are popular for FTP and WWW
because they reduce file size while maintaining acceptable quality.
25. Slideshow as Multimedia:
▪ Yes, a slideshow can be considered multimedia as it combines images, text, and sometimes
audio or video.
26. Two tags to embed a Flash file into a web page:
▪ <object> and <embed> tags.
27. How a MIDI file works:
▪ A MIDI file contains digital instructions for music playback, such as notes, pitch, and
velocity, which are interpreted by electronic instruments or software.
28. Difference between = and == operators:
= is an assignment operator, e.g., a = 5;
▪ == is a comparison operator that checks for equality, e.g., a == 5;
29. Output of the switch statement:
▪ The output will be nothing because the case labels should be case 1: and case 2: instead
of case1: and case2:.
30. Contiguous clips in the video “Trial”:
▪ If “Trial” is divided into clip1, clip2, and clip3, placing them sequentially on the timeline
without gaps makes them contiguous clips.
12
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
13
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
83. Name and explain two views available in Windows Movie Maker while making a movie.
Ans : Two views are :
Timeline View: The timeline view provides a more detailed view of our movie project and allows
us to make finer edits.
Storyboard View: The storyboard is the default view in Windows Movie Maker. We can use the
storyboard to look at the sequence or ordering of the clips in your project and easily rearrange
them.
84. Differentiate between spilt clips and trim clips with respect to Windows Movie Maker.
Ans: Split Clip: The Split button allows us to split a clip into two parts at the point displayed in
the preview monitor.
Trim clips : the trimmed part of the clip is not actually removed from the source file; it's just
hidden so the trimmed part doesn't appear in our project or published movie
85. Explain any two advantages of using multimedia on web pages.
Ans : Advantages of using Multimedia on web pages :-
i) Greater Immersion: Adding multimedia elements to a Web page make it easier to draw
attention of viewers.
ii) Enhanced Page Rankings for SEO.
iii) Better Branding: Multimedia sites are frequently preferred by marketing departments
because of their ability to completely present branding
86. Write code snippet in Java Script to find and display highest value from given four numbers
num1, num2, num3 and num4.
Ans :
x= Math.max(num1,num2, num3, num4);
document.write(“ Highest value is :” + x);
87. Which of the following are valid Javascript variable names? Add, function, average1,
my.name, NaN, 2ndobject, obj_hello, wellness
Ans : Add, average1, obj_hello, wellness
88. Describe the importance of add-ins in a web page and give names of any two websites from
where you can download add-ins.
Ans: Add-ins extends the capability of the main program by adding enhanced custom commands
and specialized features.
Add-ins may be downloaded from any of the following:
http://msdn.microsoft.com/en-us/expression/jj873995.aspx
http://www.webassist.com/go/xweb-add-ins
http://www.expressionextras.com/products/lightbox.htm
http://www.dotnetcurry.com/ShowArticle.aspx?ID=534
89. Explain WAX and the different modes in which it can work:
WAX is a high-performance and flexible video compositing and special effects software. It can
work in two modes:
1. Standalone application: Used independently for video editing and effects.
2. Plugin: Integrated with other video editing software to enhance their capabilities.
90. Two features of AVI Tricks:
▪ Supports various video formats for editing.
▪ Provides tools for cutting, joining, and applying effects to videos.
91. Two features of timeline view in Windows Movie Maker:
• Allows for precise editing of video clips by showing their sequence and duration.
• Facilitates the addition of transitions, effects, and audio tracks.
92. Two image file formats popular for FTP and WWW:
• JPEG: Compressible, widely used for photographs.
• GIF: Compressible, supports animation and transparency.
93. Two tips to remember while writing JavaScript commands:
• Always end statements with a semicolon to avoid unexpected errors.
• Use meaningful variable names to make the code more readable and maintainable.
17
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
18
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
b) Storyboard View: The default view in Windows Movie Maker, it shows the sequence of
clips in your project. This view is useful for quickly rearranging the order of clips.
105. Split Clips vs. Trim Clips in Windows Movie Maker
a) Split Clips: This feature allows you to divide a single clip into two separate clips at a chosen
point. This is useful for inserting transitions or removing unwanted sections in the middle
of a clip.
b) Trim Clips: Trimming involves cutting off the beginning or end of a clip to shorten it. This
is useful for removing unwanted footage at the start or end of a clip.
106. Advantages of Using Multimedia on Web Pages
✓ Enhanced User Engagement: Multimedia elements like videos, images, and audio can
make web pages more interactive and engaging, keeping users on the site longer.
✓ Improved Information Retention: Multimedia can help convey information more
effectively, making it easier for users to understand and remember the content.
107. JavaScript Code Snippet to Find Highest Value
JavaScript
let num1 = 10, num2 = 20, num3 = 30, num4 = 40;
let highest = Math.max(num1, num2, num3, num4);
console.log("The highest value is: " + highest);
output
The highest value is: 40
108. Valid JavaScript Variable Names
Valid:
average1, obj_hello, wellness
Invalid:
Add (capital letters are not recommended),
function (reserved keyword),
my.name (dot is not allowed),
NaN (reserved keyword),
2ndobject (cannot start with a number)
109. Importance of Add-ins in a Web Page
Add-ins enhance the functionality of web pages by providing additional features such
as analytics, social media integration, and interactive elements. Examples of websites to
download add-ins include:
Chrome Web Store
Mozilla Add-ons
Movie Panes in Windows Movie Maker
Content Pane: Displays the media files you have imported.
Storyboard/Timeline Pane: Shows the sequence of clips and allows for editing.
Preview Pane: Allows you to preview your movie as you edit.
110. Adding Titles in a Movie
Titles can be added at the beginning, before a clip, after a clip, or at the end of the movie.
Examples of file extensions supported by Windows Movie Maker:
Audio: .mp3
Video: .mp4
Image: .jpg
111. Multimedia and Graphics
a) Multimedia: The use of different types of media, such as text, audio, images, animations,
and video, to convey information.
b) Raster Graphics: Made up of pixels, resolution-dependent (e.g., JPEG, PNG).
Vector Graphics: Made up of paths, resolution-independent (e.g., SVG, EPS).
112. JavaScript Concepts
a) Event Handler: A function that runs when a specific event occurs.
JavaScript
document.getElementById("myButton").onclick = function()
{
19
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
alert("Button clicked!");
};
b) Objects: Collections of properties and methods.
JavaScript
let car =
{
make: "Toyota",
model: "Corolla",
year: 2020
};
c) Operator: Symbols used to perform operations on variables and values.
JavaScript
let sum = 10 + 20; // + is an arithmetic operator
113. Anonymous Functions in JavaScript
Anonymous functions are functions without a name, often used as arguments to other
functions.
JavaScript
setTimeout(function()
{
console.log("This is an anonymous function.");
}, 1000);
114. DWT, Code Optimization, and Web Hosting
a) DWT (Dynamic Web Template): A template used in web development to maintain a
consistent layout across multiple pages.
b) Code Optimization: The process of improving code to make it more efficient and faster.
c) Web Hosting: A service that allows individuals and organizations to make their website
accessible via the internet.
115. Terms Explained
a) Snippet: A small region of re-usable source code, machine code, or text.
b) SEO (Search Engine Optimization): The practice of increasing the quantity and quality of
traffic to your website through organic search engine results.
c) CSS (Cascading Style Sheets): A style sheet language used for describing the presentation
of a document written in HTML or XML.
116. Comparison of Trimming and Splitting a Movie Clip
Trimming:
• Definition: Trimming involves removing unwanted sections from the beginning or end of a
clip.
Splitting:
• Definition: Splitting divides a clip into two or more parts at a specific point.
117. Features of Google Reader MP3 Player
1. Simple Interface: Easy-to-use interface for playing MP3 files.
2. Playlist Support: Ability to create and manage playlists.
3. Embedded Player: Option to embed the player in websites or blogs.
118. JavaScript Code Predictions
a. document.write(parseInt("101", 2)); Output: 5 (Binary 101 is 5 in decimal)
b. document.write(parseInt("101", 8)); Output: 65 (Octal 101 is 65 in decimal)
c. document.write(parseInt("101", 10)); Output: 101 (Decimal 101 is 101)
119. JavaScript Code to Find First Occurrence of “the”
JavaScript
let userInput = prompt("Enter a string:");
let index = userInput.indexOf("the");
if (index !== -1) {
document.write("First occurrence of 'the' is at index: " + index);
} else {
document.write("'the' not found in the string.");}
20
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
22
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
<html>
<head>
<title>My Web Page</title>
<script src="code.js"></script>
</head>
<body>
<!-- Content of the webpage -->
</body>
</html>
Placement: The <script> tag should be placed within the <head> section.
30. Final Value of A and B
A = 43
a) A++: A becomes 44.
b) B = A + 1: B becomes 45.
31. Parameters for Page Transition
• Transition type: Specifies the type of transition effect.
• Duration: Specifies how long the transition lasts.
32. Recalculate Hyperlink
Recalculate Hyperlink: Updates all hyperlinks in a document to ensure they point to the
correct locations after changes.
33. Two Views in Windows Movie Maker
1. Storyboard View: Displays the sequence of clips as thumbnails.
2. Timeline View: Displays clips along a timeline, showing their duration.
34. How does a search engine work? Name any two components of a web page that the search
engines use to create an index.
Search engines work by performing three main tasks: crawling, indexing, and ranking.
Crawlers (also known as spiders or bots) navigate the web to discover new pages. These pages
are then processed and added to an index, which is a massive database of all the content the search
engine has found. When a user performs a search, the search engine scours its index to find the
most relevant results and ranks them accordingly.
Two components of a web page that search engines use to create an index are:
1. Title tags: These provide a concise summary of the page’s content.
2. Meta descriptions: These offer a brief description of the page’s content.
35. Explain parseInt() and isNaN(), giving one example of each.
• parseInt(): This function parses a string and returns an integer. It can take a second argument to
specify the radix (base) of the numeral system.
JavaScript
console.log(parseInt("10")); // Output: 10
console.log(parseInt("10", 2)); // Output: 2 (binary 10 is decimal 2)
• isNaN(): This function checks whether a value is NaN (Not-a-Number). It first converts the value
to a number if necessary.
JavaScript
console.log(isNaN("hello")); // Output: true
console.log(isNaN(123)); // Output: false
36. How can we use join() to create a string from an array using JavaScript?
The join() method in JavaScript is used to join all elements of an array into a string, separated
by a specified separator.
JavaScript
let fruits = ["Apple", "Banana", "Cherry"];
let result = fruits.join(", ");
console.log(result); // Output: "Apple, Banana, Cherry"
37. Write the output of the following JavaScript code (Justify your answer):
(i) JavaScript
var x = 10;
function function1() {
24
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
var x = 20;
}
function1();
alert(x);
Output: 10 Justification: The variable x inside function1 is local to the function and does not
affect the global variable x.
(ii) JavaScript
var x = 10;
function function1() {
x = 20;
}
function1();
alert(x);
Output: 20 Justification: The function function1 modifies the global variable x.
38. Explain logical operators in JavaScript.
Logical operators are used to combine multiple conditions. The main logical operators are:
• AND (&&): Returns true if both operands are true.
• OR (||): Returns true if at least one operand is true.
• NOT (!): Returns true if the operand is false.
39. Write the steps to embed a movie in a web page.
To embed a movie in a web page, you can use the <video> tag:
1. Use the <video> tag with the controls attribute to add playback controls.
2. Use the <source> tag inside the <video> tag to specify the video file and its format.
HTML
<video controls>
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
40. Write the name of one sound editing, one image editing, and one movie editing software.
• Sound editing: Audacity
• Image editing: Adobe Photoshop
• Movie editing: Adobe Premiere Pro
41. What are snippets? How are they created and where are they stored?
Snippets are small pieces of reusable code or text. They are created to save time and ensure
consistency. Snippets can be stored in code editors, content management systems, or snippet
management tools.
42. What are dynamic web templates? Why are they useful?
Dynamic web templates are templates that allow for the creation of web pages with dynamic
content. They are useful because they enable the separation of content from design, making it
easier to update and manage websites.
43. What are forms? Name two elements of a form.
Forms are used to collect user input on web pages. Two elements of a form are:
1. Input fields: For text, email, password, etc.
2. Submit button: To submit the form data.
44. Name the two views where the project in Windows Movie Maker project is created and
edited. Out of the two, which is the default view? Also, write one point of difference between
them.
• Storyboard view: Default view, shows the sequence of clips.
• Timeline view: Shows the timing of clips and allows for more detailed editing.
45. What happens when we trim a clip? Write steps to undo a trimmed clip.
Trimming a clip removes parts of the clip from the beginning or end. To undo a trimmed clip:
1. Go to the Edit menu.
2. Select Undo Trim.
25
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
26
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
54. Rakshit has created a website and his friend has suggested to him to go for a free hosting
server as Rahul is still learning to create a website.
a) Requirement to host a website with one’s own server: A server, domain name, and
technical knowledge to manage the server. b) Method to upload website: FTP (File Transfer
Protocol)
55. Give two examples of each type of video, audio, and picture file formats supported by
Windows Movie Maker.
• Video: .wmv, .mp4
• Audio: .mp3, .wav
• Picture: .jpg, .png
56. Is it possible to undo trim changes in a clip in Windows Movie Maker? Explain the term
contiguous clips. Name the two file formats in which a movie file is stored in Windows
Movie Maker.
• Undo trim changes: Yes, by using the Undo command.
• Contiguous clips: Clips that are placed next to each other without any gaps.
• File formats: .wmv, .mp4
57. Explain any three attributes of object tag.
1. data: Specifies the URL of the resource to be used by the object.
2. type: Specifies the MIME type of the resource.
3. width: Specifies the width of the object.
58. Three Applications of JavaScript
1. Web Development: JavaScript is essential for creating interactive and dynamic web pages. It
allows developers to implement complex features like animations, form validations, and
interactive maps1.
2. Mobile App Development: JavaScript, along with frameworks like React Native, is used to
build cross-platform mobile applications that run on both iOS and Android2.
3. Game Development: JavaScript is also used in developing browser-based games. Libraries
like Phaser make it easier to create 2D games3.
59. JavaScript Code to Convert Binary to Decimal
JavaScript
function binaryToDecimal(binary)
{
return parseInt(binary, 2);
}
let binaryNumber = prompt("Enter a binary number:");
let decimalNumber = binaryToDecimal(binaryNumber);
alert("The decimal equivalent is: " + decimalNumber);
60. Use of CSS and Free Design Websites
CSS (Cascading Style Sheets) is used to style and layout web pages.
It allows you to control the color, font, spacing, and positioning of elements on a webpage.
Two websites that offer free designs:
1. Free CSS: Free CSS
2. TemplateMo: TemplateMo
61. JavaScript Code to Sort an Array
JavaScript
let numbers = [];
for (let i = 0; i < 5; i++) {
numbers.push(parseInt(prompt("Enter a number:")));
}
numbers.sort((a, b) => a - b);
alert("Sorted array: " + numbers);
62. Changing Title Duration and Adding Titles in Movies
The title duration in a movie can be changed using video editing software like Adobe
Premiere Pro or Final Cut Pro. Besides the beginning or end, you can add a title in the middle
of a movie to introduce a new segment or chapter.
27
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
28
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
29
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
Corrections:
• Changed Var to var.
• Changed Subject to subject to maintain consistent variable naming.
• Changed Document.write to document.write.
76. Add-ins and Snippets
• Add-ins: These are additional software components that add specific features or
functionalities to an existing application. For example, browser add-ins can enhance the
capabilities of web browsers.
• Snippets: These are small, reusable pieces of code that can be inserted into a larger codebase.
Snippets help speed up development by providing pre-written code for common tasks.
77. Kompozer and Dreamweaver as Web Authoring Tools
• Kompozer: An open-source WYSIWYG (What You See Is What You Get) web authoring tool
that allows users to create and edit web pages without needing to write HTML code manually.
• Dreamweaver: A professional web development tool by Adobe that offers a comprehensive
suite of features for designing, coding, and managing websites. It supports both visual design
and code editing.
78. Advantages of Splitting Video Clips in Windows Movie Maker
• Focused Editing: Splitting video clips allows for more precise editing, enabling users to apply
effects, transitions, or edits to specific sections of the video.
• Improved Organization: Splitting clips helps in organizing the video project, making it easier
to manage and edit different parts of the video.
• Combining Split Files: Yes, split files can be combined together in Windows Movie Maker by
placing them sequentially on the timeline and applying transitions if needed.
79. Three Applications of JavaScript
1. Web Development: Creating interactive and dynamic web pages.
2. Mobile App Development: Building cross-platform mobile applications using frameworks
like React Native.
3. Game Development: Developing browser-based games using libraries like Phaser.
80. Explanation of Terms
• Add-ins: Additional software components that extend the functionality of an existing
application.
• Snippets: Small, reusable pieces of code that can be inserted into a larger codebase.
• IntelliSense: A code-completion feature in many IDEs (Integrated Development
Environments) that provides suggestions and auto-completion for code as you type.
81. Advantage of Splitting Video Clips in Windows Movie Maker
Advantages:
• Easier Editing: Splitting video clips allows you to edit specific sections of your video more
precisely. You can remove unwanted parts, add transitions, or apply effects to individual
segments.
• Improved Organization: It helps in organizing your project by breaking it down into smaller,
more manageable parts.
• Enhanced Control: You can adjust the timing and sequence of clips more effectively.
• Combining Split Files: Yes, the split files can be combined together in Windows Movie
Maker. You can simply drag and drop the split clips back-to-back on the timeline to create a
seamless video.
30
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
if (randomNum % 2 === 0)
{
console.log(randomNum + " is even.");
}
Else
{
console.log(randomNum + " is odd.");
}
}
104. JavaScript Functions
a. Display Current Date:
javascript window.onload = function()
{
document.getElementById("dateDisplay").innerHTML = new Date().toDateString();
};
b. Remove Last Element and Display in Uppercase:
javascript function removeLastElement(ar1)
{
let removedElement = ar1.pop();
console.log(removedElement.toUpperCase());
}
c. Index of ‘the’ and Length of String:
javascript function findTextAndLength(S1)
{
let index = S1.indexOf('the');
let length = S1.length; console.log("Index of 'the': " + index);
console.log("Length of string: " + length);
}
105. Average of Integer Arguments
JavaScript
function average(...numbers) {
let sum = numbers.reduce((acc, num) => acc + num, 0);
return sum / numbers.length;
}
106. Array Manipulations
a. Add “Guava” to the Array: javascript fruits.push("Guava");
b. Remove First Element: javascript fruits.shift();
c. Display Number of Elements: javascript console.log(fruits.length);
d. Add Another Array: javascript fruits = fruits.concat(veg);
107. String Manipulations
JavaScript
function stringsinjava(string1, string2)
{
string1 = string1.toUpperCase();
string2 = string2.toUpperCase();
if (string2.includes(string1))
{
console.log("String found: " + string1);
}
string1 = string1.replace(/A/g, '*');
console.log("Modified string1: " + string1);
console.log("First character of string2: " + string2.charAt(0));
}
34
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
.mpeg- MPEG files use the MPEG-1 video compression routine, a universal protocol for creating
and displaying time coded data created by the Motion Picture Experts Group.
.wav - WAV (wave) files are Microsoft's native audio sound format. WAV files can include 8-bit or
16-bit sound, in mono or stereo.
.cgm - A Computer Graphics Metafile, CGM, is also a vector format and can be opened by Canvas
and ClarisDraw.
119. Write a code in Java Script to accept a string from the user, the program should:
a. display length of the string
b. print the string in upper case
c. print the first two characters of the string
d. print the string in reverse order
Ans :
x= prompt("enter a string ");
l=x.len();
document.write(“ length of the string is : “ +l);
document.write(“ String in Uppercase is :” + x. toUpperCase());
document.write(“ First two characters of string are” + x.substring(0,2));
document.write(“ Reverse of the string is :” +x.reverse());
120. Write the code in JavaScript to accept a number from the user. It should display whether
the number entered by the user is even or odd. The code should display an alert box also
ifthe number is less than or equal to zero.
Ans :
<script>
var num;
num= prompt( enter a number”);
n=parseInt(num);
if(n<=0)
alert(“ the number is less than or equal to zero”);
if( n%2= =0)
document.write(“ number is even “);
else
document.write(“ number is odd “);
</script>
121. Give the output of the following code snippet with justification :
a) NaN % 5
b) isFinite( -Infinity)
c) “Early morning good morning”.replace(“morning”, “evening”)
d) for (i=1;i<1;i++)
document.write(“hello”);
document.write(“ByeBye”);
e) str=” Health is Wealth”;
document.write(str.match(“wealth”);
document.write(str.match(“Wealth”);
Ans :
a) NaN
b) false
c) Early evening good morning
d) ByeBye
e) null
Wealth
122. Explanation of Terms
a) MIDI: MIDI (Musical Instrument Digital Interface) is a technical standard that describes a
protocol, digital interface, and connectors that allow a wide variety of electronic musical
instruments, computers, and other related devices to connect and communicate with one
another1.
37
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
b) Helper Applications: These are external programs that a web browser can call to handle
content that the browser itself cannot process. For example, a PDF viewer or a media player
can be a helper application.
c) MixPod: MixPod was an online music playlist service that allowed users to create and share
playlists. It was popular for embedding music playlists into blogs and social media profiles.
d) Google Reader MP3 Player: This was a feature in Google Reader that allowed users to play
MP3 files directly within the feed reader. It provided a simple audio player interface for
listening to podcasts and other audio content.
e) Free Video Coding: This term generally refers to free software and tools available for video
encoding and decoding. Examples include FFmpeg, HandBrake, and Avidemux, which are used
for converting video formats, compressing video files, and other video processing tasks.
123. File Extensions
a) .mid: This is a file extension for MIDI files, which contain musical data and instructions for
playback on MIDI-compatible devices.
b) .snd: This file extension is used for sound files, typically in formats like NeXT/Sun sound
files, which store audio data.
c) .avi: AVI (Audio Video Interleave) is a multimedia container format introduced by
Microsoft, which can contain both audio and video data in a file that allows synchronous
audio-with-video playback.
d) .cvs: This seems to be a typo. The correct extension might be .csv (Comma-Separated
Values), which is a file format used to store tabular data, such as a spreadsheet or database.
e) .psd: PSD (Photoshop Document) is the default format for saving data in Adobe
Photoshop. It supports multiple layers of graphics and various imaging options.
124. JavaScript Code
a) Generate a random number greater than the entered number:
JavaScript
let userNumber = parseInt(prompt("Enter a number: "));
let randomNumber = Math.floor(Math.random() * 100) + userNumber + 1;
console.log("Random number greater than entered number: " + randomNumber);
More info on FAQ.
b) Next even number after the entered number:
JavaScript
let userNumber = parseInt(prompt("Enter a number: "));
let nextEvenNumber = userNumber % 2 === 0 ? userNumber + 2 : userNumber + 1;
console.log("Next even number: " + nextEvenNumber);
125. JavaScript Program for Marks and Grades
JavaScript
let marks1 = parseInt(prompt("Enter marks for subject 1: "));
let marks2 = parseInt(prompt("Enter marks for subject 2: "));
let marks3 = parseInt(prompt("Enter marks for subject 3: "));
38
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
39
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
b) Raster graphics: Raster graphics are images composed of pixels. An example is a JPEG
image.
c) File types:
• .au: Audio file format.
• .mpg: MPEG video file format.
130. Explanation of Terms
i) a) MIDI: MIDI (Musical Instrument Digital Interface) is a technical standard that describes
a protocol, digital interface, and connectors that allow a wide variety of electronic musical
instruments, computers, and other related devices to connect and communicate with one
another.
b) Plug-in: A plug-in is a software component that adds a specific feature to an existing
computer program. When a program supports plug-ins, it enables customization.
c) Helper Applications: These are external programs that a web browser can call to handle
content that the browser itself cannot process. For example, a PDF viewer or a media player
can be a helper application.
ii) MixPod: MixPod was an online music playlist service that allowed users to create and share
playlists. An advantage of using MixPod was its ability to embed music playlists into blogs and
social media profiles, enhancing the multimedia experience on those platforms.
131. oEmbed and Quick Media Converter
a) Three features of oEmbed:
1. Ease of Embedding: Allows websites to easily embed content such as photos, videos, and
links without needing to parse the resource directly1.
2. Standardized API: Provides a simple API for embedding media, making it easier for
developers to integrate multimedia content2.
3. Wide Support: Supported by many platforms like WordPress, Medium, and others,
allowing seamless embedding of content across different sites3.
b) Quick Media Converter: Quick Media Converter is a free video and audio conversion software
that supports a wide range of formats. It does not provide embedded code but offers a user-
friendly interface for converting media files.
132. JavaScript Script to Accept and Sort Names
JavaScript
let names = [];
for (let i = 0; i < 5; i++) {
names.push(prompt("Enter a name:"));
}
names.sort();
console.log("Sorted names: " + names.join(", "));
133. Output of the Given Code
a) The given code:
JavaScript
nm = "Fruit";
m = nm.length;
switch(m) {
case 2: document.write("two");
case 3: document.write("three");
case 4: document.write("four");
case 5: document.write("five");
case 6: document.write("six");
case 7: document.write("seven");
}
The output will be:
five
six
seven
40
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
This is because there are no break statements, so the code falls through all cases after
matching case 5.
134. JavaScript Program for Academic Category
HTML
<!DOCTYPE html>
<html>
<body>
<button onclick="assign()">Click me</button>
<script>
function assign() {
let studentClass = parseInt(prompt("Enter the class of the student:"));
let category;
if (studentClass >= 1 && studentClass <= 5) {
category = "Primary";
} else if (studentClass >= 6 && studentClass <= 8) {
category = "Middle";
} else if (studentClass >= 9 && studentClass <= 10) {
category = "Secondary";
} else if (studentClass >= 11 && studentClass <= 12) {
category = "Senior";
} else {
category = "Invalid";
}
confirm("The academic category is: " + category);
}
</script>
</body>
</html>
135. JavaScript Function with Confirm Box
JavaScript
function myfunc() {
if (confirm("Do you want to continue?")) {
alert("Thanks");
} else {
document.getElementById("demo").innerHTML = "You pressed Cancel!";
}
}
136. JavaScript Methods
a. To generate random numbers: Math.random()
b. To return the nearest integer: Math.round()
c. To return the number with the highest value: Math.max()
d. To find the position of the first occurrence of a text in a string: String.indexOf()
e. To find the length of a string: String.length
137. Lossy vs. Lossless Image Formats
• Lossy Format: Compresses image data by removing some of it, which can result in a loss
of quality. Example: JPEG.
• Lossless Format: Compresses image data without losing any quality. Example: PNG.
• JPEG: Popular for its efficient compression of photographic images, which balances
quality and file size, making it suitable for web use.
Similarity: Both GIF and JPEG are widely used image formats on the web due to their efficient
compression techniques.
139. Embedding MP3 Files into a Site
i) HTML5 <audio> tag:
HTML
<audio controls>
<source src="file.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
ii) Embedding with Flash (deprecated but still in use in some older sites):
HTML
<object type="application/x-shockwave-flash" data="player.swf">
<param name="movie" value="player.swf">
<param name="FlashVars" value="mp3=file.mp3">
</object>
iii) Using JavaScript libraries (e.g., Howler.js):
JavaScript
var sound = new Howl({
src: ['file.mp3']
});
sound.play();
iv) Embedding with iframe:
HTML
<iframe src="file.mp3" width="300" height="32"></iframe>
v) Using third-party services (e.g., SoundCloud):
HTML
<iframe width="100%" height="166" scrolling="no" frameborder="no" allow="autoplay"
src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/12
3456789&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true
&show_user=true&show_reposts=false&show_teaser=true&visual=true"></iframe>
140. JavaScript Code
JavaScript
// a. Display a confirm box with the message ‘‘Do you want to continue ?’’.
confirm("Do you want to continue?");
// b. Create an array X.
let X = [ ];
// c. Store ‘‘Top’’, ‘‘Bottom’’ in the array X.
X.push("Top", "Bottom");
// d. Store Date and Time in variable B.
let B = new Date();
// e. Print the message ‘‘Welcome’’ on a web page.
document.write("Welcome");
141. Features of JavaScript
1. Dynamic Typing: Variables can hold different data types at different times.
2. Prototype-based Inheritance: Objects can inherit properties and methods from other
objects.
3. First-class Functions: Functions are treated as first-class citizens, meaning they can be
assigned to variables, passed as arguments, and returned from other functions.
4. Event-driven Programming: JavaScript supports event-driven programming, making it ideal
for interactive web applications.
5. Asynchronous Programming: JavaScript supports asynchronous programming with
callbacks, promises, and async/await syntax.
142. MIDI
42
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
<body>
<form>
Enter your name: <input type="text" id="name" onblur="toUpperCase()">
</form>
<script>
function toUpperCase() {
let input = document.getElementById("name");
input.value = input.value.toUpperCase();
}
</script>
</body>
</html>
147. HTML and JavaScript Code
HTML Code:
HTML
<!DOCTYPE html>
<html>
<head>
<title>Button Click Example</title>
</head>
<body>
<p>Click the button to trigger a function.</p>
<button onclick="displayMessage()">Click Me</button>
<p id="message"></p>
<script>
function displayMessage() {
document.getElementById("message").innerText = "Hello World";
}
</script>
</body>
</html>
148. Explain DOM with Hierarchy of Objects
The Document Object Model (DOM) is a programming interface for web documents. It
represents the page so that programs can change the document structure, style, and content.
The DOM represents the document as a tree of objects. Here’s a simplified hierarchy:
• Document: The root of the document.
• HTML: The root element of an HTML document.
o HEAD: Contains meta-information about the document.
▪ TITLE: The title of the document.
▪ META: Metadata about the document.
o BODY: Contains the content of the document.
▪ DIV: A division or section in the document.
▪ P: A paragraph.
▪ A: An anchor (link).
▪ IMG: An image.
149. Explain the Anatomy of SEO
Search Engine Optimization (SEO) involves optimizing a website to rank higher in search
engine results. Key components include:
• Keywords: Researching and using relevant keywords.
• Content: High-quality, relevant content.
• Meta Tags: Title tags, meta descriptions.
• Backlinks: Links from other websites.
• Mobile Optimization: Ensuring the site is mobile-friendly.
• User Experience: Easy navigation, fast loading times.
44
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
<script>
document.getElementById("datetime").innerText = new Date();
</script>
</body>
</html>
<title>Greeting Message</title>
</head>
<body>
<p id="demo"></p>
<script>
function myfunc() {
var name = prompt("Please enter your name:");
if (name != null) {
document.getElementById("demo").innerText = "Hello " + name + ", Have a good day";
}
}
</script>
<button onclick="myfunc()">Click Me</button>
</body>
</html>
155. JavaScript Statements
(a) Store date and time in a variable and display on the webpage:
HTML
<!DOCTYPE html>
<html>
<head>
<title>Date and Time</title>
</head>
<body>
<p id="datetime"></p>
<script>
var currentDateTime = new Date();
document.getElementById("datetime").innerText = currentDateTime;
</script>
</body>
</html>
(i) Store the quote in a variable:
JavaScript
var quote = "Genius is one percent inspiration, 99% perspiration";
More info on FAQ.
(ii) Search for “percent” in the string and display it on the webpage:
HTML
<!DOCTYPE html>
<html>
<head>
<title>Search String</title>
</head>
<body>
<p id="searchResult"></p>
<script>
var quote = "Genius is one percent inspiration, 99% perspiration";
var searchTerm = "percent";
var searchResult = quote.includes(searchTerm) ? searchTerm : "Not found";
document.getElementById("searchResult").innerText = searchResult;
</script>
</body></html>
156. Five Ways to Embed MP3 Files into a Site
1. Using the <audio> tag:
HTML
<audio controls>
46
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
document.body.appendChild(video);
</script>
More info on FAQ.
158. Multimedia Elements Storage and Advantages
Storage: Multimedia elements like audio, video, and images are typically stored in files on a
server. These files can be referenced in HTML using URLs.
Advantages:
1. Enhanced User Experience: Multimedia elements can make web pages more
engaging and interactive, improving user experience.
2. Better Communication: Videos and images can convey information more effectively
than text alone, making it easier for users to understand complex concepts.
159. JavaScript Array Operations
JavaScript
var N = ["Sincerity", "Honesty"];
var M = ["Integrity", "Respect"];
(i) What is the <EMBED> tag used for? The <EMBED> tag is used to embed multimedia
content such as audio, video, or interactive content.
(ii) What is SRC used for? SRC specifies the URL of the embedded file.
(iii) What will happen if AUTOSTART is set to TRUE? The embedded content will start
playing automatically when the page loads.
(iv) What will happen if LOOP is set to FALSE? The embedded content will play only once
and will not loop.
(v) What will happen if HEIGHT and WIDTH are set to Zero (0)? The embedded content
will not be visible on the webpage.
162. Five Means of Embedding MP3 Files into a Site
1. Using the <audio> tag:
HTML
<audio controls>
<source src="audiofile.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
2. Using the <embed> tag:
HTML
<embed src="audiofile.mp3" width="300" height="50" autostart="false" loop="false">
3. Using the <object> tag:
HTML
<object data="audiofile.mp3" type="audio/mpeg" width="300" height="50">
<param name="autostart" value="false">
<param name="loop" value="false">
</object>
4. Using the <bgsound> tag (Internet Explorer only):
HTML
<bgsound src="audiofile.mp3" loop="1">
5. Using JavaScript:
HTML
<script>
var audio = new Audio('audiofile.mp3');
audio.play();
</script>
163. JavaScript Questions
(a) Include an external JavaScript file:
HTML
<script src="resource.js"></script>
(b) Function array OP():
HTML
<!DOCTYPE html>
<html>
<head>
<title>Array Operations</title>
</head>
<body>
<p id="arrayDisplay"></p>
<script>
function arrayOP() {
var array = ["BOSS", "NIGL", "JANA"];
array.push("CAMAL");
document.getElementById("arrayDisplay").innerText = array.join(", ");
}
arrayOP();
</script>
49
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
</body>
</html>
164. Embedding Audio and Video Files in a Web Page
Audio:
HTML
<audio controls>
<source src="audiofile.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
More info on FAQ.
Video:
HTML
<video width="320" height="240" controls>
<source src="videofile.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
165. JavaScript Code
(a) Display a confirm box with the message “Do you want to continue?”
JavaScript
var userResponse = confirm("Do you want to continue?");
function calculatePrice() {
var price = parseFloat(document.getElementById("price").value);
var paymentType=document.query Selector('input[name="paymentType"]: checked').
value;
var result = 0;
if (paymentType === "cash")
{
result = price * 0.95; // 5% discount
}
else
{
var years = parseInt(document.getElementById("years").value);
var interestRate = 0.05 + (years - 1) * 0.02;
result = (price * (1 + interestRate)) / (years * 12); // Monthly installment
}
document.getElementById("result").innerText = "Price: " + result.toFixed(2);
}
</script>
</head>
<body>
<h1>ABC Electronics Shop</h1>
<label for="price">Product Price:</label>
<input type="number" id="price" name="price"><br><br>
<label>Payment Type:</label><br>
<input type="radio" id="cash" name="paymentType" value="cash" checked>
<label for="cash">Cash</label><br>
<input type="radio" id="installment" name="paymentType" value="installment">
<label for="installment">Installment</label><br><br>
<div id="installmentOptions" style="display: none;">
<label for="years">Number of Years:</label>
<input type="number" id="years" name="years" min="1" value="1"><br><br>
</div>
<button onclick="calculatePrice()">Calculate</button>
<p id="result"></p>
<script>
document.querySelector('input[name="paymentType"]').addEventListener('change',
function()
{
var installmentOptions = document.getElementById("installmentOptions");
if (this.value === "installment")
{
installmentOptions.style.display = "block";
}
else
{
installmentOptions.style.display = "none";
}
}
);
</script>
</body></html>
170. Ternary Operator for Conditional Expressions in JavaScript
The ternary operator is a shorthand for the if-else statement. It takes three operands: a
condition, an expression to execute if the condition is true, and an expression to execute if the
condition is false. The syntax is:
52
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
JavaScript
condition ? exprIfTrue : exprIfFalse;
Example:
JavaScript
let age = 18;
let canVote = (age >= 18) ? "Yes" : "No";
console.log(canVote); // Output: "Yes"
In this example, if age is 18 or more, canVote will be “Yes”; otherwise, it will be "No".
171. Array Functions in JavaScript
(a) splice():
Definition: The splice() method changes the contents of an array by removing or
replacing existing elements and/or adding new elements in place.
Example:
JavaScript
let fruits = ["Apple", "Banana", "Cherry"];
fruits.splice(1, 1, "Mango");
console.log(fruits); // Output: ["Apple", "Mango", "Cherry"]
Here, “Banana” is removed and “Mango” is added at index.
(b) unshift():
Definition: The unshift() method adds one or more elements to the beginning of an
array and returns the new length of the array.
Example:
JavaScript
let fruits = ["Banana", "Cherry"];
fruits.unshift("Apple");
console.log(fruits); // Output: ["Apple", "Banana", "Cherry"]
“Apple” is added to the beginning of the array.
172. Appropriate Methods and Objects
(a) Method that returns the nearest integer value of the argument passed:
• Method: Math.round()
• Object: Math
JavaScript
let num = 4.7;
console.log(Math.round(num)); // Output: 5
(b) Method to add two arrays:
• Method: concat()
• Object: Array
JavaScript
let array1 = [1, 2, 3];
let array2 = [4, 5, 6];
let combinedArray = array1.concat(array2);
console.log(combinedArray);
// Output: [1, 2, 3, 4, 5, 6]
173. Points for Web Designers to Keep in Mind
Pradeep should consider the following points while designing a website:
1. User Experience (UX): Ensure the website is user-friendly, with intuitive navigation
and a clean, appealing design. This helps users find what they need quickly and easily4.
2. Mobile Responsiveness: Design the website to be responsive, meaning it should work
well on various devices, including smartphones and tablets. This is crucial as a
significant amount of web traffic comes from mobile devices.
174. Use of In-built Optimizer Tool of MEW
The in-built optimizer tool of My Ether Wallet (MEW) is used to optimize the gas fees
for transactions. It helps users to set the most efficient gas price, ensuring that transactions
are processed quickly and cost-effectively.
175. JavaScript Function to Return the Greater Number
53
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
Here’s a simple function that accepts two integer variables and returns the greater number:
JavaScript
function getGreaterNumber(a, b) {
return (a > b) ? a : b;
}
176. JavaScript Events
(a) onLoad
The onLoad event occurs when an object has been loaded. It is often used to execute a
script once a web page has completely loaded, including all dependent resources like images
and stylesheets.
(b) onSubmit
The onSubmit event occurs when a form is submitted. It is commonly used to validate
form data before sending it to the server.
(c) onClick
The onClick event occurs when an element is clicked. It is widely used to trigger a
function when a user clicks on a button or link.
177. JavaScript Function to Display a Hello Message
Here’s a function that uses the prompt method to accept a name and then displays a hello
message:
JavaScript
function greetUser()
{
let name = prompt("Please enter your name:");
if (name)
{
alert("Hello, " + name);
}
}
When the user enters the name “Piyush”, the output will be: Hello, Piyush.
178. Use of Web Packages and the Need for Website Backups
Web Packages:
Web packages, like Webpack, are tools used to bundle JavaScript files and other assets
for use in a browser. They help manage dependencies, optimize code, and improve the
development workflow by automating tasks like minification and transpilation.
Need for Website Backups:
Backing up a website is crucial to safeguard against data loss, hacking, accidental
deletions, or server failures. Regular backups ensure that you can quickly restore your website
to its previous state, minimizing downtime and data loss. Methods for backing up a website
include manual backups, automated backups with plugins, and hosting provider backups.
179. JavaScript Program to Calculate Percentage
Here’s a simple program to accept the marks of a student in three subjects and calculate
the percentage:
JavaScript
function calculatePercentage()
{
let subject1 = parseFloat(prompt("Enter marks for Subject 1:"));
let subject2 = parseFloat(prompt("Enter marks for Subject 2:"));
let subject3 = parseFloat(prompt("Enter marks for Subject 3:"));
let totalMarks = subject1 + subject2 + subject3;
let percentage = (totalMarks / 300) * 100;
alert("Your percentage is: " + percentage.toFixed(2) + "%");
}
54
BASKAR Lec. in Computer Science WEB APPLICATION QUESTION ANSWERS CLASS 12 CBSE
55