0% found this document useful (0 votes)
10 views5 pages

GR 9 - Chp3 - Notes

The document contains a series of multiple-choice questions (MCQs) and short response questions (SRQs) related to HTML, CSS, and JavaScript for Grade 9 students. It covers topics such as the structure of HTML documents, the purpose of various tags, and the differences between websites and web applications. Additionally, it includes long response questions that require coding examples and explanations of web development concepts.

Uploaded by

nafshanalvi09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

GR 9 - Chp3 - Notes

The document contains a series of multiple-choice questions (MCQs) and short response questions (SRQs) related to HTML, CSS, and JavaScript for Grade 9 students. It covers topics such as the structure of HTML documents, the purpose of various tags, and the differences between websites and web applications. Additionally, it includes long response questions that require coding examples and explanations of web development concepts.

Uploaded by

nafshanalvi09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Gr: 9 Unit 3 Date: 2/9/2024

Exercise
Solve the following MCQs.
1) Everything in HTML is identified on the basis of
a) Brackets C) Tags
b) Title b) Image

2)The output of HTML code is visible in


a) Notepad c) Browser
b) File d) Spreadsheet

3) Name of a web can be given using ……………………… tag.


a) Body c) Head
b) Title d) Footer

4) Main parts of a document are arranged in ……………………….. tag.


a) Head c) Body
b) Title d) Line Break

5 The heading tag-pair for 5th level heading is ………………….


a) <h5… h5> C) h5> .. </h5
b) <h5… /h5> d) <h5> .. </h5>

6) Span is used to provide …………………………………… to a line.


a) Font c) Style
b) Border d) Color1)

7) First row of table in HTML is called ……………………


a) Title row C) Header Row
b) Top Row d) Upper Row'

8) p' tag-pair is used for …………………………..


a) Print C) Page break
b) Page align d) Paragraph

9) A variable cannot start with a …………………………….


a) Alphabet C) String
b) Number d) Character

10) The first value assigned to a variable after declaration is called ……………….
a) Beginning value c) Initialization
b) Starting value d) Substitution

Answer the following Short Response Questions (SRQ).


1. Contrast between website and web application.
ANS: A website is a collection of interlinked static web pages that display content (e.g., text, images, videos) to
users. It focuses on delivering information.
A web application is interactive, allowing users to input data and perform tasks (e.g., filling forms, online
shopping). It requires backend processing and dynamic content rendering.
1|Page
Gr: 9 Unit 3 Date: 2/9/2024

2. What is 'href' refers to and how to use it?


ANS: href stands for "Hypertext Reference" and is an attribute used in <a> tags to define the URL of the linked
resource. For example:

3. Enlist the optional parameters to open a webpage.


ANS:
✓ width: Specifies the width of the new window.
✓ height: Specifies the height of the new window.
✓ top: The distance of the window from the top of the screen.
✓ left: The distance of the window from the left of the screen.
✓ resizable: Determines if the window can be resized.
✓ scrollbars: Enables or disables scrollbars in the window.
✓ toolbar: Shows or hides the toolbar.

4. List out the frequent tags used in text of a webpage and what are they used for?
ANS:
✓ <p>: Defines a paragraph.
✓ <h1> to <h6>: Define headings, from largest (<h1>) to smallest (<h6>).
✓ <b>: Makes text bold.
✓ <i>: Italicizes text.
✓ <u>: Underlines text.
✓ <span>: Applies inline styles to text.
✓ <br>: Inserts a line break.

5. Explain the role of <body> tag-pair in a document.


ANS: The <body> tag defines the main content of an HTML document. All visible elements like text, images,
videos, and links are placed inside the <body> tag. It directly affects the appearance and layout of the webpage.

6. How the event-based code is used in JavaScript?


ANS: Event-based code in JavaScript executes functions in response to specific user actions or system triggers,
such as clicking a button, hovering over an element, or submitting a form. Example:

7. Infer about the External CSS? Where are External CSS generally used?
ANS: External CSS refers to a separate stylesheet file that contains CSS rules, linked to an HTML document using
the <link> tag. It is generally used for maintaining consistency across multiple webpages and simplifying code
management. Example:

2|Page
Gr: 9 Unit 3 Date: 2/9/2024
Answer the following Long Response Questions (LRQ).

1. What is Document Object Model? Explain with the help of an example.


ANS: The Document Object Model (DOM) is a programming interface for web documents. It represents the
structure of an HTML or XML document as a tree, where each element is a node. Developers can manipulate
these nodes using JavaScript to change the content, structure, or style of a webpage dynamically.

2. Write code to differentiate between different types of headings in HTML.


ANS:

3. Elaborate steps and provide code to load a background image in a webpage.


Steps:
a. Save the image file in your project folder.
b. Use the background-image property in CSS to set the image as a background.
Code:

4. With the help of sample code, highlight different methods to incorporate CSS code in a HTML webpage.
ANS:
• Inline CSS

• Internal CSS

3|Page
Gr: 9 Unit 3 Date: 2/9/2024

• External CSS

5. Sketch steps and provide code to apply border and color to a table in a webpage.
ANS:
• Create a table using the <table> tag.
• Use CSS to style the border and color.
Code:

6. Discuss the functionality JavaScript can provide in a webpage with the help of a suitable example code.
ANS: JavaScript provides interactivity, dynamic content updates, form validation, and animations.
Example:

4|Page
Gr: 9 Unit 3 Date: 2/9/2024
7. Articulate steps and write code to create a scrolling text on a webpage.
ANS: Use the <marquee> tag to create scrolling text.
Code:

8. Enlist steps to add a video clip in a website which starts playing as the web page loads.
ANS:
1. Use the <video> tag in HTML.
2. Add the autoplay attribute to start playing the video automatically.
Code:

9. Cite steps for compiling the result of your last examination in a tabular form and display it in a webpage.
ANS:Steps:
1. Use the <table> tag to create a table.
2. Include headers and rows with the examination data.
Code:

5|Page

You might also like