IMAGE, LINKS AND TABLE-HTML

 


Question 1

What do you understand by Alternate text?

Answer

Alternate text is the text that is displayed as an alternate to the image when the browser is not able to display the image. It is specified using the Alt attribute of <IMG> tag.

Question 2

Differentiate between <TH> and <THEAD> tag.

Answer

<TH> tag<THEAD> tag
<TH> tag is used to specify column heading by making the heading text bold.<THEAD> tag is used to group header rows that define the table's header. The table header defined by the <THEAD> tag will appear on each page of the document where the table is displayed.
<TH> tag should be enclosed within <TR> tag.<THEAD> tag should be enclosed within <TABLE> tag.
For example,
<TABLE>
<TR>
<TH BGCOLOR = "PINK">Input Devices</TH>
<TH BGCOLOR = "PINK">Output Devices</TH>
</TR>
<TR>
<TD>Mouse </TD>
<TD>Monitor </TD>
</TR>
<TR>
<TD>Keyboard </TD>
<TD>Printer </TD>
</TR>
</TABLE>
For example,
<TABLE>
<THEAD BGCOLOR = "PINK">
<TR>
<TD>Input</TD>
<TD>Output</TD>
</TR>
<TR>
<TD>Devices</TD>
<TD>Devices</TD>
</TR>
</THEAD>
<TR>
<TD>Mouse </TD>
<TD>Monitor </TD>
</TR>
<TR>
<TD>Keyboard </TD>
<TD>Printer </TD>
</TR>
</TABLE>

Question 3

Which tag in HTML is used to combine the cells vertically in a Table?

Answer

Rowspan attribute of <TD> tag is used to combine the cells vertically in a Table.

Question 4

Which tag is used to create a row in a Table?

Answer

<TR> tag is used to create a row in a Table.

Question 5

Which sides of the Table's outside border would be visible by setting Frame = "Vsides".

Answer

The left and right sides (vertical sides) of the Table's outside border would be visible by setting Frame = "Vsides".

Question 6

Mention the suitable HTML tag and the attribute to insert an image named 'globe.jpg' in the background of a webpage.

Answer

We can use the <BODY> tag with the BACKGROUND attribute to insert an image named 'globe.jpg' in the background of a webpage.
E.g. <BODY BACKGROUND = "GLOBE.JPG">

Question 7

Mention any two attributes of <IMG> tag along with their significance.

Answer

Two attributes of <IMG> tag are as follows:

  1. Src — The Src attribute helps in defining the source of an image.
  2. Alt — The Alt attribute lets us specify text as an alternate to the image, that the browser can display if the image cannot be displayed.

Question 8

How can text be displayed in place of an image for users whose browsers do not support images?

Answer

We can use the Alt attribute of the <IMG> tag to display text in place of an image for users whose browsers do not support images.
E.g.
<IMG Src= "garden.jpg" Alt = "Image of a garden">

Question 9

Name two common graphics file formats that most browsers recognise.

Answer

Two common graphics file formats that most browsers recognise are GIF and JPEG.

Question 10

Name the attributes of <A> tag which are used for internal linking in a web page.

Answer

The attributes of <A> tag which are used for internal linking in a web page are:

  1. Name — The Name attribute allows the user to create links within the same document. This attribute specifies the name of the anchor being set up.
  2. Href — The Href attribute serves as a hypertext link, i.e., the command that leads the browser to another section on our web page.

Question 11

Write names of two attributes each for the following tags:

(i) <Img>

(ii) <Table>

(iii) <A>

Answer

(i) <Img> — Src, Alt

(ii) <Table> — Bgcolor, Bordercolor

(iii) <A> — Href, Name

Question 12

Which tags divide HTML tables in multiple sections?

Answer

HTML tables can be divided into multiple sections by the following tags:

  1. <THEAD> — This tag is used to group header rows that define the table's header.
  2. <TBODY> — This tag defines a table's body.
  3. <TFOOT> — This tag defines a group of footer rows in a table.

Post a Comment

0 Comments