NCERT Solutions for Class 10 Foundation of Information Technology – Inserting Images and Links in HTML
NCERT Solutions for Class 10 Foundation of Information Technology – Inserting Images and Links in HTML
Very Short Answer Type Questions [1 Mark each]
Question 1. How can text be displayed in place of image for users whose browser do not support images? CBSE 2007
Answer: The alt attribute of tag is used to display the text in place of image for the users whose browser do not support images.
Question 2. Write a statement in HTML that inserts an image named ‘school.jpg’ found in the ‘images’ folder of the current folder. In case the image cannot be found, it should display ‘Schools in India’.
Answer: 
More Resources for CBSE Class 10
- NCERT Solutions
- NCERT Solutions for Class 10 Science
- NCERT Solutions for Class 10 Maths
- NCERT Solutions for Class 10 Social
- NCERT Solutions for Class 10 English
- NCERT Solutions for Class 10 Hindi
- NCERT Solutions for Class 10 Sanskrit
- NCERT Solutions for Class 10 Foundation of IT
- RD Sharma Class 10 Solutions
Question 3. The following code is written to align the image in center in the browser’s window.
However, the>desired result is not achieved. Mention the reason.

Answer: The reason for not getting the desired result is that center is not a value of align attribute in tag.
Question 4. Why width and height attributes are used?
Answer: The width and height attributes are used, such that downloading of an image will be faster after knowing the dimensions of the images in the browser.
Question 5. What do you mean by hypertext?
Answer: Hypertext acts as a link on which you click to navigate to the desired content.
Question 6. In HTML, how linking can be done?
Answer: In HTML, linking can be done by using anchor tag followed by href attribute.
Question 7. Explain linking.
Answer: When one Web page or a text fragment is connected to another Web page, then it is called linking. It is of two types— internal linking and external linking.
Question 8. What happens when we click on a hyperlink in a Web page? CBSE 2008
Answer: When we click on a hyperlink in a Web page, it provides a link that leads from one document to another.
Question 9. Give the expansion of the following
Answer:
- alt is used for alternate text attribute.
- is used for anchor tag.
Question 10. Write the HTML command to display the following in your Web page. A2 + B2 CBSE 2006
Answer: The HTML command is – A2 + B2
Question 11. Write the output on the Web page for the following HTML command.
Atomic weight of O2
Answer: The output on the Web page will be Atomic weight of O2
Short Answer Type Questions [2 & 3 Marks each]
Question 1. Describe the use of alt attribute with tag.
Answer: The alt attribute is used to define ‘alternate text’ for an image. It tells the Website visitor, what he/she is missing on the page if the browser cannot load images. The browser will then display the altertnate text instead of the image. It is good to include alt attribute for each image on a page to improve the appearance and usefulness of the document.
Question 2. Write the HTML code to display an image on the right side of the page. CBSE 2016
Answer:
Question 3. Name the values that can be assigned to align attribute of tag.
Answer: The values that can be assigned to align attribute of tag are as follows:
- top
- bottom
- left
- right
- middle
Question 4. Write the HTML code to display an inline image named pencil.jpg located at C: in the center of your Web page. CBSE 2013
Answer:
Question 5. Define height and width attributes of tag.
Answer: The width and height attributes tell the dimension of an image to the browser. Both (height and width) attributes require integer values (dimension of image in terms of either pixels or percentage of its actual size).

Question 6. Identify the errors in the following HTML code and write the correct code with each correction underlined. CBSE 2011
IMAGES HERE IS MY IMAGE FILE
Answer:
Error 1 The
Error 2 bgcolor attribute of body element supports a color like red, green or its color value.
Error 3
Error 4 body element must be closed not bgcolor attribute.
The correct code is as follows:IMAGES HERE IS MY IMAGE FILE
Question 7. Explain the need of linking between Web pages.
Answer: Linking between different Web pages is required, as when we create Websites, different html files (Web pages) are created. These files contain different modules and cannot be open individually. If we link between them, the Website becomes more productive and informative.
Question 8. How is external linking different from internal linking? CBSE 2004, 05
Answer: External link is a type of linking that goes to another Website. It is a linking of two different documents. While, internal linking is a type of linking that links pages within a single Website, various sections of same document or different document.
Question 9. Explain the given command
Click Here for wild animals CBSE 2006
Answer: In this command, anchor tag and its href attribute is included. The text (Click Here for wild animals) will appear underlined and indicates that clicking the text activates the hypertext link. The address of the referenced document can be specified by an absolute or relative URL.
Thus, “wild.html” is an URL or Web page address and Click Here for wild animals is the hyperlinked text.
Question 10. Name the attributes of tag which are used for internal linking in a Web page. CBSE 2014, 13
Answer:The attributes of tag which are used for internal linking in a Web page as follows:
- href used to specify the URL of the segment the link goes to.
- name gives the name to the segment.
Question 11. What is the purpose of using the attribute href in tag?
Answer: The href stands for Hypertext Reference. The href attribute is used with tag to specify link to some other HTML page or Website.
e.g.
click here to go to learncbse.
It will display like:
click here to go to learncbse.
Question 12. Write the HTML code to create a link for school .jpg located at C:. CBSE 2014
Answer:
Image
Question 13. Write an simple HTML code to show an example of internal linking.
Answer:
Internal Linking It is top of the page
Top
Question 14. What is the purpose of mailto function?
Answer: The mailto function is used to send E-mail messages to multiple recipients. For this, we only need to type the E-mail address of the recipients in the same link separated by commas.
Question 15. Write an HTML code to show the use of mailto function.
Answer:
Use of mailto Send your views to aaa_rr@gmail.com< / a >
Question 16. Write the HTML code to send an E-mail to abc@xyz.com from your Web page. CBSE 2013
Answer:
abc@xyz.oom
Question 17. Distinguish between and tags with example.
Answer: Distinguishes between and tags are as follows:
| Tag | Tag |
| The tag is known as superscript tag. | The tag is known as subscript tag. |
| It is used to define superscripted text. | It is used to define subscripted text. |
| Tags that are used to specify superscripted written as text |
Tags that are used to specify subscripted written as text |
|
e.g. HTML command to display |
e.g. HTML command to display log 2+log x is log 2+log x |
Question 18. Write the full forms of: CBSE 2013
Answer:
- Superscript
- Anchor
Image
- Subscript
Long Answer Type Questions [5 Marks each]
Question 1. Explain various attributes of tag.
Answer:
Attributes of Tag
An attribute is an extra piece of information associated with a tag that provides further details about the tag.
Following are the various attributes of tag:
The src Attribute: The src (source) attribute takes URL (Universal Resource Locator) of an image file as value, which points to the direct location of an image to be displayed.
The image that you specify in your tag should be in your computer otherwise the image will not be displayed and in place of image a cross mark in a box 0 will appear.
The alt Attribute: This attribute of tag is used to provide alternate text when an image on a Web page cannot be displayed.
The alternative text is the text associated with an image that serves the same purpose and conveys the same essential message. As per HTML standard, alt attribute is optional but is highly recommended.
The align Attribute: This attribute is used to set the position of an image in a Web page according to the user’s requirements. In HTML, images appear inline with a single line of the text. But, HTML standard does not define a default alignment for the images with respect to other text and images in the same line.
There are some values of image alignment attribute as follows:
- Top Alignment
- Middle Alignment
- Bottom Alignment
- Left Alignment
- Right Alignment
The width and height Attributes: When an image is added to a Web page, it is not mandatory to specify width and height of the image. At the time of loading an image, a box will appear on the place where the image will be loaded.
The border Attribute: You can set the border of an image that you want to use in your Web page. The border attribute of the tag specifies the width of the border around an image. By default, an image has no border in HTML.
Question 2. Which attribute is used to specify the location of an image file in tag? Explain.
Answer: The attribute you need to get an image to display on a Web page is the src attribute.
In the src attribute of the tag, you can specify the path of the image that you want to add to the Web page. This may be an image in the same directory, an image somewhere else on the same server, or an image stored on another server.
The syntax for src attribute is
Question 3. Define various alignments of align attribute with example.
Answer: There are some values of image alignment attribute as follows:
Middle Alignment
This alignment is different in both Internet Explorer and Mozilla Firefox. In Internet Explorer, this alignment aligns the image to the middle of the tallest item in the current line. While in Mozilla Firefox, this alignment aligns the image to the baseline of the current line in which it is placed.
Example: To show middle alignment of an image.Alignment Middle Alignment h1>
A flower, sometimes known as a b'oom or blossom, is the reproductive structure found in flowering plants. The biological function of a flower is to effect reproduction, usually by providing a mechanism for the union of sperm with eggs.
Bottom Alignment
This alignment aligns the bottom edge of the image, to the same horizontal plane as the baseline of the text. Both Internet Explorer and Mozilla Firefox treat this alignment in the same manner.
Example: To show bottom alignment of an image.Alignment Bottom Alignment
A flower, sometimes known as a bloom or blossom, is the reproductive structure found in flowering plants. The biological function of a flower is to effect reproduction, usually by providing a mechanism for the union of sperm with eggs.
Left Alignment
This alignment aligns the image to the left on the Web page respectively of the browser window.
Example: To show left alignment of an image.Alignment Left Alignment
A flower, sometimes known as a bloom or blossom, is the reproductive structure found in flowering plants. The biological function of a flower is to effect reproduction, usually by providing a mechanism for the union of sperm with eggs.
Right Alignment
This alignment aligns the image to the right on the Web page respectively of the browser window.
Example: To show right alignment of an image.Right Alignment Right Alignment
Cimg src="flower2.jpg" align="right"> A flower, sometimes known as a bloom or blossom, is the reproductive structure found in flowering plants. The biological function of a flower is to effect reproduction, usually by providing a mechanism for the union of sperm with eggs.
Question 4. Write HTML code to illustrate
- listed hyperlinks
- image hyperlinks
Answer:
Listed Hyperlinks: It is noticeable that tag can also be used for more complex task (as with images or with lists etc.)
Example: To show listed hyperlinks.List List
Output:

Image Hyperlinks: Images can also be used as hyperlinks. To create image as a link, following syntax is used:
Example: To show image as link. < title>Image as Link
Output:

Question 5. Explain the following (with example):
- linking on same Web page.
- linking on different Web page.
Answer:
Linking on the Same Web Page
To create an internal link, you need to use a pair of tags. The first tag is used to specify the name of the target location for identification purpose. It is known as target fragment. You can use the tag with its name or id attribute to identify a fragment. This type of anchor is commonly called as named anchor.
The first step is to make the target fragment. The simple syntax to do so is written below:
Part A
Where, “aa” is the name of fragment/segment you want to refer (like top, bottom etc.). The second tag is used to create a link to the target fragment. The simple syntax to link to the target segment is written below:
ClickHere
In the second tag, the value of href attribute with # symbol is to be specified.
Example: To show the internal linking in an HTML document.Internal Linking Linking in a page
Click here to go to the bottom of the page.
>
>
>
You are at the bottom of the page.
Output:

Linking Sections of Different Web Pages
Internal linking enables us to link sections of different Web pages also. It can be done by specifying the name of the Web page and the section which is to be linked. To link two Web pages, you first need name to the section by using name attribute of tag that you want to link. Suppose, we need to link a section of HTML1.html to HTML2.html. Create a named anchor in HTML1.html.
The syntax is given below:
Different Page
After this, you have to write the code to refer to it, from Web page HTML2.html. Following is the code to do so:
Here, HTMLl.html is the name of html file to the section of which you want to link and # link is the segment name you want to link in that html file.
Multiple Choice Questions [1 Mark each]
Q1. Web browsers display images in the following format
(a) XBM
(b) JPEG
(c) GIF
(d) All of these
Answer: (d) All of these
Q2. Which tag is used to insert an image in Web page?
(a)
(b)
A flower, sometimes known as a b'oom or blossom, is the reproductive structure found in flowering plants. The biological function of a flower is to effect reproduction, usually by providing a mechanism for the union of sperm with eggs.
Fruit Chart
Vegetable Chart 

Click Here
Click Here