Page 157 - CA_165_V2.0_Flipbook
P. 157
D. Source-based/Case-based/Passage-based question.
The <IMG> (Image) tag is an empty tag. The attribute SRC (Source) is used with the IMG tag to specify the location
and name of the image file. The <P> tag should be placed before the <IMG> tag because the <IMG> tag does not
form a new block element and would appear in the same line unless we add <P> tag. A blank line appears before
and after the image when the image insention tag <IMG> is enclosed within <P> and </P> tags.
1. Which of the following is not an attribute of the <IMG>tag?
i. Border ii. Width
iii. Height iv. All of these
2. Which of the following attributes is used to set the space towards left or right margin of the image?
i. Hspace ii. Vspace
iii. Qspace iv. None of these
3. Height attribute is used to specify the height of the image in ..................................... in comparison to its
original size?
i. Pixels ii. Points
iii. Percentage iv. Both i. and iii.
4. Vspace attribute is used to set the space towards the ..................................... margin of the image.
i. Top ii. Left
iii. Right iv. Middle
5. Which of the following attributes is used to assign an alternative text that will be displayed over the
image when the mouse pointer is placed over it?
i. Align ii. Src
iii. Alt iv. Hspace
Ans. 1. iii. 2. i. 3. iv. 4. i. 5. iii.
SECTION B
(Subjective Type Questions)
A. Short answer type questions.
1. Write one line of code as per the given condition:
To add a link on a web page which takes you to the e-mail composing screen corresponding to the id
abc@gmail.com on clicking the image select.jpg.
Ans. <a href = "mailto:abc@gmail.com"><img src=select.jpg></img></a>
2. Discuss the tags that have been used to write the following content on the web page:
H O
2
Ans. To write the following code we can write: <S>H<SUB>2</SUB>O</S>
Here, <SUB> is a container tag. It is used to display the blocked text in subscript form. The enclosed text
is displayed as the base of the normal text and <S> or <STRIKE> are container tags. These tags are used
to strikethrough the blocked text. Enclosed text is displayed with a line drawn through the middle of it.
3. Differentiate between cellpadding and cellspacing attributes of a <table> tag.
Ans. Cellpadding attribute is used to specify the space between grid line and content in the cell whereas,
cellspacing attribute is used to specify the space between cells.
More About HTML 155

