Class-X CH-4 HTML Images, Link and Tables
Class-X CH-4 HTML Images, Link and Tables
Question 1
1. <IMG> tag
2. <A> tag
3. <JUMP> tag
4. none of the above
Answer
<A> tag
Reason — The anchor tag <A> is used to link a hypertext to a new document or jump to a new
page.
Question 2
Which of the following is not a valid value for align attribute of <IMG> ?
1. top
2. middle
3. bottom
4. center
Answer
center
Reason — The align attribute of <IMG> tag takes top, middle and bottom values. The value
'center' is not used.
Question 3
If the image you are loading in the web page is not available, then you want a text to appear in
the image place holder, which attribute lets you define this text ?
1. src
2. align
3. text
4. alt
Answer
alt
Reason — The alt attribute specifies alternate text the browser may show if the image display is
not possible or disabled by the user.
Question 4
For linking to another web page, its URL is specified with ............... attribute of <A> tag.
1. href
2. title
3. name
4. none of the above
Answer
href
Reason — For linking to another web page, its URL is specified with href attribute of <A> tag.
Question 5
For internal linking, the section names are provided by ............... attribute of <A> tag ?
1. href
2. title
3. name
4. none of the above
Answer
name
Reason — For internal linking, the section names are provided by name attribute of <A> tag.
Question 6
1. alt
2. src
3. align
4. name
Answer
src
Question 7
The ............... attribute of <img> tag specifies an alternate text for an image, if the image cannot
be displayed due to any reason.
1. alt
2. alternate
3. tooltip
4. text
Answer
alt
Reason — The alt attribute of <img> tag specifies an alternate text for an image, if the image
cannot be displayed due to any reason.
Question 8
The default alignment of images, that are inserted in the web page, is ............... .
1. left
2. right
3. middle
4. inline with text
Answer
Question 9
While creating a Web document, which unit is used to express an image's height and width ?
1. Centimetres
2. Pixels
3. Dots per inch
4. Inches
Answer
Pixels
Reason — While creating a Web document, pixels are used to express an image's height and
width.
Question 10
1. Left
2. Right
3. Inline with text
4. Middle
Answer
Reason — The default alignment of images, that are inserted in Web page, is inline with text.
Question 11
1. <BODY>
2. <IMG>
3. <TABLE>
4. None of these
Answer
<TABLE>
Reason — Border, frame, cellspacing, cellpadding, align are the attributes of <TABLE> tag.
Question 12
To create a link you surround the text or image with a(n) ............... tag.
1. link
2. anchor
3. reference
4. target
Answer
anchor
Reason — To create a link you surround the text or image with a(n) anchor (<A>) tag.
Question 13
Answer
Question 14
Which will let text wrap down the side of the image?
Answer
1. 250, 400
2. 400, 250
3. <250><400>
4. <400><250>
Answer
250, 400
Reason — The 'height' and 'width' attribute of <IMG> tag tell the browser to reserve space before
actually downloading an image.
<img src ="Computers.jpg" width ="250" height ="400">
The above command tells the browser to reserve the image place with a width of 250 pixels and
a height of 400 pixels.
Question 16
Answer
(P + Q) <SUP> 2 </SUP>
Reason — The superscript tag <SUP> is used to write (P + Q)2 by using the command —
(P + Q) <SUP> 2 </SUP>
Question 17
1. sub
2. sup
3. sups
4. subs
Answer
sub
Question 18
1. <table>
2. <tc>
3. <td>
4. <tr>
Answer
<table>
Reason — The tag that starts a table cell is <table> tag.
Question 19
1. <colspan>
2. <td>
3. <tr>
Answer
<td>
Reason — <td> tag is used to add columns to tables.
Question 20
1. Neither
2. Cell settings
3. Table settings
Answer
Cell settings
Choose the correct HTML to left-align the content inside a table cell.
1. <td valign="left">
2. <tdleft>
3. <td align="left">
4. <td leftalign>
Answer
<td align="left">
Reason — The "align" attribute is used to specify the horizontal alignment of the content within
a table cell. By setting the "align" attribute to "left", the content inside the <td> tag will be left-
aligned.
Question 22
1. <thead><body><tr>
2. <table><tr><td>
3. <table><head><tfoot>
4. <table><tr><tt>
Answer
<table><tr><td>
Reason — The <table> tag is used to define tables, <tr> tag is used to define table rows and
the <td> tag is used to define data cells.
Question 23
Settings for columns(<td> tag) have higher priority than settings for rows(<tr> tag).
Answer
True
Reason — In HTML, the <td> tag is used to define a cell within a table, while the <tr> tag is
used to define a row. When applying settings to cells and rows, the settings applied directly to
the <td> tag will take precedence over settings applied to the <tr> tag.
Question 24
1. colspan = n
2. Both rowspan = n and colspan = n
3. rowspan = n
Answer
rowspan = n
Reason — rowspan attribute specifies the number of rows a cell should span.
Question 25
What is required to create a reference to a remote site that is different from creating a local link ?
Answer
Reason — When creating a reference to a remote site, the URL of the remote site needs to be
specified as the value of the href attribute in the <a> tag.
Question 26
Which one of the following is the list type that will create a bulleted list ?
1. unordered
2. option
3. decorated
4. ordered
Answer
unordered
1. It ensures that a user will not be able to copy the image to their computer.
2. The image will not render if these attributes are left out.
3. These attributes constrain the image's proportions.
4. Specifying these dimensions helps a browser render pages faster.
Answer
Reason — Specifying the width and height of the image enables the browser to reserve space
before actually downloading the image, speeding document rendering and eliminating the
content shifting.
Question 28
Which one of the following HTML tags is surrounded by <a></a> container tags to create an
image link ?
1. <img>
2. <ul>
3. <br>
4. <pic>
Answer
<img>
Reason — <img> tag is surrounded by <a></a> container tags to create an image link .
Question 29
1. <src = img>
2. <src = image>
3. <img = file>
4. <img src = file>
5. <image src = file>
Answer
Question 30
1. Name
2. Tag
3. Link
4. Href
Answer
Href
Reason — The href property in <A> tag is used to create a link to an anchor.
Question 31
1. TROW
2. TABLER
3. TR
4. ROW
Answer
TR
Question 32
1. THEAD
2. TABLE
3. TBORDER
4. none of these
Answer
TABLE
Reason — In order to add border to a table, BORDER attribute is specified in <TABLE> tag in
the following manner:
<TABLE BORDER = "2">
... contents ...
</TABLE>
Question 33
1. SRC
2. LINK
3. CELLPADDING
4. BOLD
Answer
CELLPADDING
Reason — 'Cellpadding' is an attribute of <TABLE> which gives the amount of space between
the cell border and the cell contents.
Question 34
Answer
Question 35
Answer
Question 36
............... attribute is used with <A> tag to specify the URL of link.
Answer
href attribute is used with <A> tag to specify the URL of link.
Question 37
False
Reason — The alt attribute specifies alternate text the browser may show if the image display is
not possible or disabled by the user.
Question 38
ROWSPAN with <TABLE> tag is used to merge more than one cell row wise. (T/F)
Answer
False
Reason — ROWSPAN with <TD> tag is used to merge more than one cell row wise.
Question 39
Target attribute with <A> tag is used to open a link in a new window. (T/F)
Answer
True
Reason — By setting the target attribute to "_blank", the link will open in a new window or tab,
depending on the user's browser settings. For example:
<a href="example.com" target="_blank">Open in New Window</a>
Question 40
Align and Valign are the attributes used with <TD> tag to set the alignment of data in a table.
(T/F)
Answer
True
Reason — Align attribute is used to control the horizontal alignment of the contents of a cell and
Valign is used to control the vertical alignment of the contents of a cell.
Question 41
False
Question 1
Answer
Inline image means that image displays in line with the text, i.e., the specified image is loaded
separately and placed into the text flow as if the image were some special character.
Question 2
Answer
1. Top alignment
2. Middle alignment
3. Bottom alignment
4. Left and Right alignment
Question 3
Which attributes of <A> facilitates external linking ?
Answer
Question 4
Question 5
Answer
The "mailto" function is used to create email links on webpages, allowing users to click on the
link and open their default email client with a new message addressed to the specified email
address.
Question 6
X. Xylophone
Y. Yak
Z. Zebra
Answer
Question 7
How would you indent a single word and put a square bullet in front of it ?
Answer
To indent a single word and put a square bullet in front of it, we can use an unordered list in the
following way:
Question 8
Apple pie,
pudding,
and pancake,
All begin with an A.
Answer
Question 9
Use a definition list in a table to show that the word "glunch" means "a look of disdain, anger, or
displeasure" and that the word "glumpy" means "sullen, morose, or sulky."
Answer
<HTML>
<BODY>
<TABLE>
<TR>
<TD>
<DL>
<DT> Glunch </DT>
<DD> a look of disdain, anger, or displeasure</DD>
</DL>
</TD>
</TR>
<TR>
<TD>
<DL>
<DT> Glumpy </DT>
<DD> sullen, morose, or sulky</DD>
</DL>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Question 10
How would you make the word Elephant appear whenever the actual elephant.jpg image couldn't
be displayed by a Web browser ?
Answer
We can do this by setting the value of alt attribute to 'Elephant' in the following way:
Question 11
Write the HTML to make the elephant.jpg image appear on the right side of the page, with a big
headline reading "Elephants of the World Unit!" on the left side of the page next to it.
Answer
Question 12
How would you insert an image file named elephant.jpg at the very top of a Web page ?
Answer
To insert the image at the very top of a Web page, the align attribute of <IMG> tag should be set
to "top" in the following way:
<IMG SRC = "ELEPHANT.JPG" ALIGN = "TOP">
Question 13
Suppose you have a large picture of a standing elephant named elephant.jpg. Now make a small
named fly.jpg appear to the left of the elephant's head and mouse.jpg appear next to the
elephant's right foot.
Answer
The HTML code to perform the given task is as follows:
Question 14
Question 15
You plan to publish a CD-ROM disk containing HTML pages. How do you create a link from a
page in the \guide folder to the \ guide \ mains \ kolkata.htm page ?
Answer
Question 16
Answer
Question 17
Answer
An HTML table allows a user to arrange data — text, preformatted text, images, links, forms,
form fields, other tables, etc., into rows and columns of cells.
Question 18
Which attributes are used to give border to a table ?
Answer
1. border — This attribute tells the table how large the border should be.
2. frame — This attribute is used with border attribute and it allows the user to state which
portions of the border will be displayed by the browser.
3. rules — It is used with border attribute and it allows the user to state which portions of
the inside border edges will be displayed.
4. bordercolor — This attribute is used to specify the color of a table's border.
Question 19
Which attribute lets you control the display of select border sides of a table ?
Answer
Frame attribute lets us control the display of select border sides of a table.
Question 20
Answer
Question 21
Answer
To control the spacing of cells, the 'Cellspacing' and 'Cellpadding' attributes are used.
Question 22
Align attribute of <TABLE> tag is used to align the table on a web page. It can have the following
values — left, right and center. These values indicate whether the table should be placed flush
against the left or right margin of the text flow, with the text flowing around the table or in the
middle with the text flow above and below.
Question 23
The summary attribute is used to provide a long description of the table's purpose. It is usually
given for the benefit of people using speech or Braille based user agents.
Question 24
Answer
Question 25
Answer
Question 26
Answer
(i) width
(ii) background
(iii) bgcolor
(iv) rowspan and colspan
(v) valign
Question 27
<TH> tag stand for table header. The contents declared as header are displayed in a distinctive
style, like bold-faced.
<TR> tag stands for table row. <TR> marks the beginning of a table row and </TR> marks the
end of a table row.
Question 28
Answer
Answer
The <THEAD>, <TBODY> and <TFOOT> tags are used to divide HTML tables in multiple sections.
While the <THEAD> and <TFOOT> tags define the header and footer sections , the <TBODY> tag
defines the body section of the table.
Question 30
What attributes can you use with TABLE tag but not with TR tag ?
Answer
We can use the following attributes with TABLE tag but not with TR tag —
1. summary
2. rules
3. frame
4. border
5. bordercolor
6. cellpadding
7. cellspacing
8. height
9. width
Question 31
Answer
Yes, we can insert hyperlinks inside table cells by using the anchor tag <A>...</A>.
Question 32
Answer
The <THEAD>, <TBODY> and <TFOOT> tags are used to divide HTML tables in different
sections. While the <THEAD> and <TFOOT> tags define the header and footer sections ,
the <TBODY> tag defines the body section of the table.
Consider the following example:
<HTML>
<BODY>
<TABLE>
<THEAD BGCOLOR = "PINK">
<TR>
<TD> Header </TD> <TD> Header </TD>
</TR>
</THEAD>
<TBODY BGCOLOR = "YELLOW">
<TR>
<TD> Body cell data </TD> <TD> Body cell data </TD>
</TR>
<TR>
<TD> Body cell data </TD> <TD> Body cell data </TD>
</TR>
</TBODY>
<TFOOT>
<TR>
<TD> Footer </TD> <TD> Footer </TD>
</TR>
</TFOOT>
</TABLE>
</BODY>
</HTML>
Question 33
Answer
<HTML>
<BODY>
<TABLE>
<TR> <TD ROWSPAN = "2"> A </TD> <TD> B </TD> </TR>
<TR> <TD> C </TD> </TR>
</TABLE>
</BODY>
</HTML>