Digital Learning

Wednesday, July 17, 2024

Computer-Science-Class-8 Chapter-4(2024-25):

Computer Science
Class-8
Chapter-4 More on HTML

A. Tick the correct option: 
1. ________ is the extension of HTML document.
a. .htm            b. .ht                        c. .html                            d. none of these
Answer: .html
2. Which of the following is an empty tag?
a. <hr>            b. <img>                c. <pt>                            d. none of these
Answer: <hr>
3. Which of the following is not an attribute of the <hr> tag?
a. BGCOLOR    b. align                  c. size                            d. none of these
Answer: BGCOLOR
4. Which of the following tags makes text bold?
a. <b>               b. <u>                    c. <i>                            d. none of these
Answer: <b>
5. BGCOLOR is the attribute of ______________ tag.
a. body             b. IMG                    c. font                            d. none of these
Answer: Body
6. Which of the following is not an attribute of the <img> tag?
a. src                b. alt                        c. align                            d. none of these
Answer: alt


B. Name the following tags:
1. <hr>                                          2. <u>
3. <img>                                      4. <a>
5. <i>                                            6. <b>
Answer: 
1. Horizontal rule tag
2. Underline tag
3. Image tag
4. Anchor tag
5. Italic tag
6. Bold tag

C. Write T for true or F for false:
1. <hr> is not empty tag.
Answer: F
2. You can change font type of the text using <img> tag.
Answer: F
3. You can change color of horizontal line.
Answer: T
4. You can add moving text to your web page by using <marquee> tag.
Answer: T
5. <i> tag is used to make the text italics.
Answer: T
6. The BACKGROUND attribute of the <body> tag is used to place an image as a background.
Answer: T


D. Answer the following questions:
1. Write a short note on HTML.
Answer: HTML stands for Hyper Text Markup Language. It is a markup language that is used for creating web pages to display on world wide web. Web pages are text documents. These text documents have HTML commands with an extension .html.

2. Explain the <hr> tag with its syntax.
Answer: The horizontal rule on <hr> tag is an empty tag that is used to draw a horizontal line on web page to separate different parts of the text from one another. You can also use <hr> tag to make web page more attractive and readable.
Syntax: <hr size=5 width=80% align="centre" color="green">.

3. How will you change size and width of horizontal line in HTML?
Answer: The <hr> tag has attributes which allow you to define the size, width alignment for the horizontal line. To change the size and width of horizontal line follow the  syntax: <hr size=6 width=70%>

4. How can you use an image as a background in a web page?
Answer: We can use an image as a background in a web page. The BACKGROUND  attribute of <body> tag is used to place an image as a background.
To use an image as a background in a web page, type the HTML codes given below and see output in browser:
<html>
<head>
<title>School</title>
</head>
<body>
<body background="D:/My folder/dolphin.jpg">
</body>
</html>


5. What is a hyperlink?
Answer:  A hyperlink is a word, group of words, or image that you can click onto jump to another document. When you move the cursor over a link in a web page, the arrow will turn into a little hand.

6. What is an anchor tag?
Answer: The HTML <a> tag defines a hyperlink. This tag is called anchor tag.

7. Differentiate between HREF attribute and COLOR attribute.
Answer: The HREF attribute specifies the destination of a link.
By default, links will appear as follows in all web browsers:
1. An univisited link is under line and blue.
2. A visited link is underlined and purple
3. An active link is underlined and red.
The color attribute is used to change the color.

8. How will you create a link on web page?
Answer: To create a link on web page follow the given codes:
<html>
<head>
<title>School</title>
</head>
<body>
<h1> <font size="25" Dolphin</font></h1>
<p> Dolphins are actually marine mammals.</p>
<a href="D:\my folder\dolphin.jpg"> Click here to see picture of dolphin</a>
<body>
<html>


No comments:

Post a Comment