Section: Frames in HTML Fill in the blanks. 1. The small rectangular

advertisement
Section: Frames in HTML
Fill in the blanks.
1. The small rectangular areas created in the main browser window are known as frames.
2. <FRAMESET> and <FRAME> tags are used to create frames in HTML.
3. Rows and cols attribute of the frameset tag divides the window into rows and columns.
4. Src attribute of the frame tag attaches the default URL.
5. Scrolling attribute of the frame tag decodes whether a scrollbar will be displayed in the frame
or not.
Answer the following questions.
6. How can you display multiple HTML documents in one browser window?
By using frames
7. What is the use of <FRAMESET> tag?
To divide an HTML document into parts
8. Explain attributes of the <FRAMESET> tag.
Cols: Specifies the number and size of columns in a frameset. Its value can be a specific
percentage of the web page, or in pixels.
Rows: Specifies the number and size of rows in a frameset. Its value can be a specific
percentage of the web page, or in pixels.
Border: Specifies the thickness of the frame borders for all frames in pixels in the
outermost frameset. Default value is 5 pixels. It can be used only for the outermost
frameset.
Bordercolor: Specifies the color of the border of the frame.
Frameborder: Specifies whether the border should be visible or not. Its value can be either
Yes or No.
9. How can you set the borderwidth and color of frame?
Page 108
<FRAME src = “A.HTML” name = “F1” frameborder = “Yes”
bordercolor = “Red” scrolling = “No”
marginheight = “30” margin width = “30”>
10. Can a frame be created without the initial file name?
It depends:
Yes for <FRAMESET> tag
No for <FRAME> tag: If the source file mentioned with src attribute is not present then a
message would be displayed: ‘Files Not Found’
If the src attribute of the frame tag is not mentioned then an empty frame will be displayed.
11. Give the differences between the following:
a. <FRAMESET> tag and <FRAME> tag
Setting a single frame vs. references to HTML documents as frames
b. Frameborder and Bordercolor attributes of <FRAMESET> tag
Visibility vs. color of the border
c. Scr and Name attribute of <FRAME> tag
Reference to HTML document vs. frame name.
d. Frameset and Nested frameset
Single frame vs. nested frames
12. Name the attributes used for the given instructions:
a. The attribute that specifies the scroll information for the frame.
Page 108
Scrolling: Specifies scroll information for the frame. It can have a value Yes, No or
Auto. Yes means scrollbars are displayed. No means scrollbars are never available and
Auto specifies to provide scrolling when necessary. Auto is a default value.
b. The attribute that sets the space between the frame content and its top and bottom margins.
Page 108
Marginheight
c. The attribute that specifies whether the frameborder is to be set or not.
Page 108
Frameborder
d. The attribute that defines the number of columns in a frameset.
Page 108
cols
e. The attribute that gives a name to a frame.
Page 108
name
Section: JavaScript
Fill in the blanks.
13. JavaScript is a scripting language used to make web pages more interactive.
14. <SCRIPT> tag is added to HTML document to add the scripting language.
15. The method used to display the text in the browser window is document.write().
16. window.prompt() method is used to display a small window with an input field.
17. var (along with variable name) is used to declare a variable in JavaScript.
Answer the following questions.
18. Give reasons why you use JavaScript.
JavaScript is used because:
It helps to add interactive elements to HTML pages.
It is a scripting language which is a lightweight programming language.
Everyone can use JavaScript without purchasing a license.
It is supported by all major browsers, such as Internet Explorer, Firefox, Chrome, Opera
and Safari.
A JavaScript is lines of executable computer code usually embedded directly in HTML
pages.
19. What is an external JavaScript file? Give example.
If you want to run the same JavaScript on several pages, without having to write the same
script on every page, you can write a JavaScript in an external file. The external file is
simply a text file containing JavaScript code with a .js file extension.
To use the external script, point to the .js file in the ‘scr’ attribute of the <SCRIPT> tag.
For example,
<SCRIPT language = “JavaScript” scr = “scriptFile.js”>
...
[additional JavaScript statements]
...
</SCRIPT>
20. What are the rules for writing a program in JavaScript?
Page 120
The scripting language must be written within <SCRIPT> . . . </SCRIPT> tag in an HTML
document.
The <SCRIPT> . . . </SCRIPT> tag can either be written in <HEAD> or <BODY> of the
HTML document.
A program can have more than one <SCRIPT> . . . </SCRIPT> tags.
JavaScript is a case sensitive language.
Using semicolon at the end of the statement is optional. Using semicolons makes it possible
to write multiple statements on one line.
21. What should you do to make your program more reliable?
Add comments
22. What are variables? Give example.
Variables are the names assigned to a memory location that can be used for storing data.
Its value can change during the execution of a script.
If you assign another value then the previous one is overwritten.
A variable can have a short name, like x, or a more descriptive name, like Filename. These
variables, by default, hold only one value at a time.
23. Give the differences between the following:
a. document.write() and window.prompt()
User output vs. user input.
b. window.alert() and window.confirm()
Read by the user vs. accepted or rejected by the user (the user is more active in the letter
case)
c. HTML and JavaScript
Static and non-interactive vs. dynamic and interactive.
d. parseInt() and parseFloat()
Converting text into an integer (e.g., 6) vs. converting text into a numeric value (e.g., 5.73)
e. Arithmetic and comparison operators
Arithmetic vs. logic
24. Write down the JavaScript statements to perform the following tasks.
a. Declare variables: length, breadth, area.
var L, B, A
b. Accept the value of length and breadth in these variables from the user.
L = prompt(“Enter the length”);
B = prompt(“Enter the breadth”);
c. Convert the length and breadth into float type and store it in variable area.
L = parseFloat(L);
B = parseFloat(B);
d. Display the area with an appropriate message and in pink color.
color = “pink”
A = L * B;
document.write(“the area is”, A);
e. The command to process or to stop giving more inputs should come from the user.
Use window.confirm() method
Section: Tweening
Fill in the blanks.
25. Motion and shape tweening are two ways of tweening.
26. Tweening comes from words in between.
27. Control + Enter keys are used to test a Flash movie.
28. .swf (shockwave file) is the extension of the Flash file created when a movie is tested.
29. <EMBED> tag is used to place a video or a sound file in your web page.
Answer the following questions.
30. How a Flash movie be used in an HTML documents? Name the tag.
Pages 140 and 141
<EMBED>
The Shockwave file: This is the file that is created when the movie is tested. It is uploaded
on the Internet and cannot be edited, it can only be viewed. For example, myMovie.swf
31. a. Explain all the attributes of the tag with example.
Pages 141, 142
<EMBED> tag is used for placing a video or a sound file in your web page. It is an empty
element to be given inside the <BODY> tag. The tag used for embedding any flash file in an
HTML web page is:
<EMBED src = “MyMovie.swf”
width = ”760”
height = “420”
Loop = 10>
where
Src is an attribute that specifies the sound or animation file to be embedded.
Width is the width of the embedded file in the HTML document.
Height is the height of the embedded file in the HTML document.
Loop specifies the number of times the audio/video to be executed.
b. What is a scene? Can you have multiple scenes in your movie?
Page 142
A scene is a clip of a movie.
Yes.
32. Give the difference between:
a. Motion tweening and Shape tweening.
Pages 134 and 137
Moving as a whole of an unchanged form of a shape vs. changing the form of a shape.
b. .swf and .fla file
.swf file cannot be edited
.fla file can be edited
c. Playing a movie and Publishing a movie.
Pages 136, 139, 140, 141, 142
Playing and testing a movie is done on your computer, whereas publishing of a movie on
the Internet means putting the movie to the Internet server so that anybody can view the
movie.
Give one word for the following:
33. Rapid display of sequences of images.
Tweening or playing a movie.
34. The default Flash file created.
.fla file
35. Preparing a file to be uploaded on a website.
EMBED
36. Moving a symbol from one position to another.
Motion
37. Tag to include a Flash file in an HTML document.
<EMBED>
Section: Viruses
Fill in the blanks.
38. Virus is a destructive software program.
39. The virus does not infect hardware and damage software.
40. Boot sector in that area of the computer that is accessed when the computer is turned on.
41. The file infector virus infects files that contain executable code like .exe, .com, .dll etc.
42. The Worm is destructive software program designed to spread through computer networks.
Tick the correct answer from the choices given.
43. Computer viruses are similar to biological virus because
a. medicines are effective against them
b. they spread when you come in contact with an infected computer
c. they are very dangerous for us
d. they pass from computer to computer
44. Melissa virus can infect only
a. Windows based machine
b. DOS based machine
c. Windows as well as DOC based machine
d. Macintosh machine
45. Disk Killer is an example of
a. Boot sector virus
b. Macro virus
c. Multipartite virus
d. Polymorphic virus
46. Software that prevents, detects, and removes destructive program:
a. Worm
b. Trojan horse
c. Virus
d. Anti-virus
47. One-Half and Emperor are the examples of
a. Boot sector virus
b. Macro virus
c. Multipartite virus
d. Polymorphic virus
Answer these questions.
48. What is a computer virus? Why are they named as virus?
Page 144
A computer virus is a destructive software program.
It can spread from one computer to another through disks, networks, email links, etc.
A computer virus may corrupt or delete data on a computer. It may even delete everything
on the hard disk, and can interfere with computer operations.
.....
49. a. What damages can the virus not do? List them.
When the computer system is not affected by a virus:
Computer virus cannot infect write-protected discs (CD-ROMs) or infect written
documents.
Virus do not infect compressed files, unless the file was infected prior to the compression.
No virus can do a physical damage to computer hardware, such as chips, boards, and
monitors.
Macintosh viruses do not infect DOS/Windows computer software and vice versa. For
example, the Melissa virus of 1998 worked only on Windows based machines and could not
operate on Macintosh computers.
b. How does a virus spread?
Computer virus can spread:
A computer virus begins to work and spread whenever you start up the infected program
or application. For example, any word processing application that contains the virus will
place the virus in memory every time the program is run.
Once the virus is copied in the computer memory it may get programmed to attach to other
applications, disks or folders. It may also infect a network.
These viruses behave in different ways. Some stay active only till the infected application is
running. They become inactive when the computer is turned off. Other viruses operate
every time you turn on your computer after they have infected a system file or network.
Before the easy accessibility of the Internet, viruses were typically spread by infected
floppy disks.
c. What are the symptoms of a computer virus?
Page 146
You can detect the presence of virus in your computer. The following are some primary
indicators that a computer may be infected:
The computer runs slower than usual.
The computer stops responding, or it locks up frequently.
The computer crashes, and then it restarts every few minutes.
Applications on the computer do not work correctly.
Disks or disk drives are inaccessible
You see unusual error messages.
You see distorted menus and dialog boxes.
You cannot print items correctly.
There is a double extension on an attachment that you recently opened, such as a .jpg,
.gif or .exe extension.
New icons appear on the desktop that you did not put there, or the icons are not
associated with any recently installed programs.
Strange sounds or music plays from the speakers unexpectedly.
A program disappears from the computer even though you did not intentionally remove
the program.
d. How can you protect your computer from a virus?
Pages 149 and 150
50. Give the difference between:
a. Multipartite and Polymorphic virus
Hybrid infecting boot records and program files vs. changes in the virus code whenever
it passes to another machine.
b. Computer and Biological virus
Biological, chemical and physical processes vs. only information processes
c. Worm and Trojan horse
Spreading through the networks vs. masking as a good program.
d. Virus and Logic bombs
Complete replicating, non-dormant, programs vs. non-replicating non-complete, often
dormant, programs parts.
Download