HTML II CLASS X
HTML II
Q1. 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:
<html>
<body>
<center>
<img
src="C:\pencil.jpg">
</center>
</body>
</html>
Q2. Define
height and width attributes of <img> 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).
<html>
<body>
<img src=”picture.jpg” height = “50” width = “50”>
</body>
</html>
Q3. Write
the HTML code to create a link for school .jpg located at C:\. CBSE 2014
<html>
<body>
<a href = "C:\school. jpg">Image</a>
</body>
</html>
Q4.
Write
an HTML code to show the use of mailto function.
Answer:
<html>
<head>
<title> Use of mailto </title>
</head>
<body>Send your views to
<a href= "mailto:aaa_rr@gmail.com"> aaa_rr@gmail.com< / a >
</body>
</html>
Q5. Write the HTML code to
send an E-mail to abc@xyz.com from your Web page. CBSE 2013
Answer:
<html>
<body>
<a href="mailto:abc@xyz.com?
subject="practical file work'">abc@xyz.com</a>
</body>
</html>
Q6.
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.
<html>
<head>
<title> Alignment </title>
</head>
<body>
<h1> Middle Alignment </ h1>
<img src="flower2.jpg" align="middle">
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.
</body>
</html>
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.
<html>
<head> <title> Alignment </title> </head>
<body>
<h1> Bottom Alignment </h1>
<img src="flower2.jpg" alt="flower" align="bottom">
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.
</body>
</html>
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.
<html>
<head> <title> Alignment </title> </head>
<body>
<h1> Left Alignment </h1>
<img src="flower2.jpg" align="left">
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.
</body>
</html>
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.
<html>
<head> <title> Right Alignment </title> </head>
<body>
<h1> Right Alignment </h1>
<img 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.
</body>
</html>
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) <a>
(b) <table>
(c) <img>
(d) <p>
Answer: (c) <img>
tag is used to insert inline image in a Web page.
Q3. The correct HTML code for inserting an image is CBSE 2012
(a) <img href=”image.gif”>
(b) <img> image.gif</gif>
(c) <img src = “image.gif”>
(d) <image src = “image.gif” >
Answer: (c) <img
src=”image.gif “>
Q4. src attribute used with <img> tag stands for CBSE 2013
(a) screen (b) screen resolution count
(c) source (d) structure
Answer: (c) source
Q5. …………. attribute is used to specify the location of an image
file.
(a) alt
(b) src
(c) align
(d) name
Answer: (b) src attribute
is used to specify the location of an image file.
Q6. The text specified in the alt attribute is displayed as
tooltip in
(a) Internet Explorer
(b) Google Chrome
(c) Both (a) and (b)
(d) None of these
Answer: (a) The text specified
in alt attribute is displayed as tooltip in Internet Explorer only.
Q7. The alternate text of an image can be displayed by using
attribute of the <img> tag.
(a) src (b) alt
(c) align (d) None of these
Answer: (b) alt attribute
of the <img> tag is used to display the alternate text of an image.
Q8. alt attribute allows CBSE 2016
(a) addition of an alternate hyperlink
(b) addition of a border to image
(c) use of an alternative image in place of the specified image
(d) addition of alternative text about an image
Answer: (d) alt attribute
allows addition of alternative text about an image.
Q9. The default alignment of images, that are inserted in Web
page, is
(a) left
(b) right
(c) inline with text
(d) middle
Answer: (c) An image
which is inserted in Web page by default placed inline with text.
Q10. Which is not a valid value in the align attribute of <img>
tag? CBSE 2014,2013
(a) top
(b) center
(c) bottom
(d) right
Answer: (b) center is not
a valid value in the align attribute of <img> tag. To align in center,
<center> tag can be used.
Q11. Why is it important to specify width and height attribute
in <img> tag? CBSE 2013
(a) To ensure that image is not copied
(b) The image will not render without these
(c) To stop the image from loading
(d) Helps the browser to load the Web page faster
Answer: (d) Helps the browser
to load the Web page faster.
Q12. When creating a Web document, which unit is used to express
an image’s height and width? CBSE 2013
(a) Centimetres
(b) Pixels
(c) Dots per inch
(d) Inches
Answer: (b) Image’s height and
width unit are expressed in pixels or in per cent form.
Q13. The <a> tag is
(a) a container tag
(b) an empty tag
(c) a closing tag
(d) None of these
Answer: (a) <a> is a
container tag, which requires starting as well as matching ending tag.
Q14. ………… is the default color of a hyperlink.
(a) Red
(b) Blue
(c) Green
(d) Black
Answer: (b) Blue
Q15. The tag used in HTML to link a Web page with other Web page
is CBSE 2013
(a) <a> (b) <h> (c) <u> (d) <l>
Answer: (a) <a> anchor tag
is used to create links.
Q16. Which tag tells, where a link starts? CBSE 2014
(a) <1> (b) <start>
(c) <a> (d) None of these
Answer: (c) <a> tag
specify that a link starts, in which, href create a hyperlink.
Q17. Which command should be use to link a page with HTML page?
CBSE 2013
(a) <a link = “page.htm” > </a>
(b) <a href = “page.htm”>page</a>
(c) <a connect = “page.htm”></a>
(d) <a attach = “page.htm”></a>
Answer: (b) <a
href=”page.htm”>page</a>
Q18. With which code you .can make an image works as link? CBSE
2016
(a) <a href = “URL”>Text</a>
(b) “<a href=”ABC.html”><img src =”graphic.gif”>Click
Here</a>
(c) <a ref=mailto:<img src = graphic.gif>Click Here</a>
(d) None of the above
Answer: (b) With <a
href=”ABC.html”><img src= “graphic.gif >Click Here</a> image
works as link.
Q19. To create a hyperlinked image
(a) the image tag should be within anchor tag
(b) the anchor tag should be within image tag
(c) the image tag should be before the anchor tag
(d) the image tag should be after the anchor tag
Answer: (a) The image tag should
be within anchor tag to create hyperlinked image.
Q20. For internal linking, the section names are provided by
attribute of <a> tag.
(a) title
(b) href
(c) name
(d) None of these
Answer: (c) For internal
linking, section names are provided by name attribute.
Q21. Is it possible to link within the current page?
(a) No
(b) Only in framesets
(c) Yes
(d) None of these
Answer: (c) Yes, it is
possible to link within the current page, which is called internal linking.
Q22. ………. attribute of the <a> tag is used to name a
section in a Web page to create an internal link.
(a) href
(b) name
(c) align
(d) link
Answer: (b) name attribute is
used to create an internal link.
Q23. …………….. attribute is used to set the color of a link while
it is active.
(a) vlink
(b) alink
(c) Both
(a) and (b)
(d) None of these
Answer: (b) alink attribute is
used to set the color of link while it is active.
Q24. The attribute which is used to send E-mails through a
Website.
(a) tomail
(b) mailto
(c) Both
(a) and (b)
(d) None of these
Answer: (b) mailto attribute
is used to send E-mails through a Website.
Comments
Post a Comment