Class 8 Ict Practice Worksheet
Class 8 Ict Practice Worksheet
1. Action: Destination address, where the information will be sent. E.g. action=”mailto:[email protected]”
2. Method: How the information will be sent. Values are Get and Post
3. Name: Any name assigned to this form
<INPUT> tag is used to accept information from the user. <INPUT> is an empty tag.
1. Input Type=“Text” is used to create a Text Box. E.g. Enter User Name or Login information.
2. Input Type=“Password” is used to create a textbox for password. It shows the written characters as
bullets or special characters
Attributes are Name, Maxlength, Size
Attributes are Name, value, checked(to keep any selected value by default)
6. Input Type=“submit” is used to create a Submit button to send the information to destination
specified in action attribute of FORM tag
7. Input Type=“reset” is used to create a Reset button. It Bring the form on its original state before
anything was typed.
8. Input Type=“file” is used to create a File upload option. A browse button will appear automatically to
browse and upload any file from your computer.
Attributes is Name
9. Input Type=“image” is used to create a Submit button in form of an image. Here the picture will work
as a Submit button.
<TEXTAREA> </TEXTAREA> tag is used when you want your user to enter multiple lines of data in a text box.
<SELECT> Tag is used when you want to create a drop-down menu list in your Form.
Attributes are Name, Size, Multiple (to allow user to select multiple values by pressing Ctrl key)
<OPTION> tag is used inside SELECT tag to write each item of that drop-down list. These are container
elements and have start and end tag.
Attributes are Value, Selected (to keep any selected value by default)
Q. Answer the following questions
Fill in the blanks
2 <INPUT type=“Password”>
3 <INPUT type=“checkbox”>
4 <INPUT type=“submit”>
5 <INPUT type=“reset”>
6 <INPUT type=“file”>
7 <INPUT type=“image”>
8 <INPUT type=“button”>
9 <TEXTAREA>
10 <Option>
11 <Select>
12 <Form>
1. How would you create a Reset button with displaying value “Clear Everything”?
2. Write HTML tags along with attributes to create a File upload option in HTML form.
3. Make a text area asking users to write something about themselves in a job application form.
4. Create a scroll list of name of months in a year. Keep March as selected by default. The size of list should be 4.
5. Assemble the given tags in correct order according to the structure of an HTML document.
6. </P>, <FORM>, <BODY>,<TITLE>, <P>, </HTML>, </FORM>, <HTML>, </TITLE>, </BODY>.
7. Create a survey form and ask user his name and password in text box, gender in radio button, favourite food and
favourite restaurants in checkboxes. Give options for selection. Also give some space for any other comment user
wants to make related to this survey. Create a submit and reset button with suitable value.
JavaScript in HTML
Q. 1 Fill in the Blanks
1. ‘55.98.2’ will be displayed by parseInt() as ______________ and by parsefloat() as ________________
2. ’19.2years’ in parsefloat() will be written as ________________ and in parseInt() as ______________
3. A-159 in parsefloat() will be written as ________________ and in parseInt() as ______________
4. In JavaScript, ___________________ is used for displaying text on the browser window.
5. Confirm box includes _____________ and ______________ buttons.
6. Alert window can only be closed by _____________ button.
7. In JavaScript, _________________ is used instead of <BR> tag.
8. In window methods, _________________ window always stays on top.
9. In JavaScript, ‘<=’ means __________________ and it as a __________________ operator.
10. ! means ____________ in JavaScript.
11. || represents _________________ in JavaScript.
12. Joining or adding two or more set of characters in JavaScript is called _____________________ and it is done by
_________ operator
13. Variables cannot be made of more than ___________ characters.
14. Names of variables cannot be started with __________________
15. Using of semicolon at the end of each JavaScript statement is _________________
16. Names assigned to a memory location for storing data are called ____________
17. The section between opening <SCRIPT> tag and closing </SCRIPT> tag is called ___________________
18. To take an input from a user or ask any question, ______________ method of JavaScript is used.
19. In JavaScript, the single line comments are represented by _______ and multiple lines comments are represented by
________
20. JavaScript is a _________________ language.
21. JavaScript files are saved with a _____________ file extension.
22. In window.confirm() method the values are returned true if _________ is pressed and are returned false if
____________ is pressed.
23. HTML is not case sensitive as compared to ________________
Write JavaScript Statements to perform the following tasks.
a) Ask users their name and date of birth and display them on the webpage as “Hello _______. Your date of birth is
________” in blue colour with font size 5.
b) Accept the radius from user and calculate diameter, area and circumference of circle. Show the results in Alert
Boxes separately with a proper message.
c) Ask users their marks of English, Urdu, Maths and Science and show the average of marks in parseFloat
d) Take the value of side of square and display the value of area and perimeter in green color.