HTML II — Images, Links and Tables

Solutions for Computer Applications, Class 10, CBSE

Application Oriented Questions

9 questions

Question 1

Consider the following web page:

The text at P is? The link at R helps the user to? HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

(a) The text at P is :

  1. the title of a book on tennis
  2. a different web page
  3. another website
  4. a web address

(b) The link at R helps the user to :

  1. close this session on the internet
  2. access new websites
  3. use a search engine
  4. send an email

(c) Clicking on the person serving in the image at Q displays another web page. This area in the image is a :

  1. hyperlink
  2. website
  3. wildcard
  4. search engine

(d) The Internet can be used to find the websites of other tennis coaching associations by using :

  1. find and replace
  2. a search engine
  3. a CD ROM
  4. a DVD
Application Oriented Questions

Answer:

(a) a web address
Reason — We write the URL or web address of a website in the address bar of the browser to access its content.

(b) send an email
Reason — The link at R uses "mailto" function to open an e-mail form directly which can be filled by the user and sent to the given email address.

(c) hyperlink
Reason — A hyperlink lets the user open another web page or document just by clicking on it.

(d) a search engine
Reason — A search engine helps a user to find information about any topic using keywords.

Question 2(a)

Write the HTML code to do the following :

To display a horizontal line of green colour.

Application Oriented Questions

Answer:

<HR COLOR = "GREEN">

Question 2(b)

Write the HTML code to do the following :

To create a hyperlink on the word CLICK to an image named testimage.jpeg.

Application Oriented Questions

Answer:

<A HREF = "testimage.jpeg">Click</A>

Question 3

Write output of the following HTML code.

<html> <head> <title> Table </title> </head>
<body>
<table BORDER = "1">
<tr> <th ALIGN = "center" rowspan = "3"> ONE </th> <th> TWO </th>
<th>THREE </th> </tr>
<tr> <td> Rose </td> <td> Lily </td> </tr>
<tr> <td ALIGN = "center"> Pansy </td> <td ALIGN = "center"
colspan = "2"> Dahlia </td> </tr>
</table> </body> </html>
Application Oriented Questions

Answer:

Output
Table with rowspan. Application Oriented Questions. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Question 4

Observe the following table and write the HTML code to generate it :

Write HTML code to generate the table. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Application Oriented Questions

Answer:

<HTML>
<BODY>
<TABLE BORDER = "1">
<TR> <TH ROWSPAN = "2"> Serial No </TH> <TH ROWSPAN = "2"> Class </TH> <TH colspan = "3" ALIGN = "CENTER"> Number of Students </TH> </TR>
<TR ALIGN = "CENTER"> <TD> English </TD> <TD> Hindi </TD> <TD> Regional </TD> </TR>
<TR ALIGN = "CENTER"> <TD> 1 </TD> <TD> X A </TD> <TD> 35 </TD><TD> 10 </TD><TD> 6 </TD> </TR>
<TR ALIGN = "CENTER"> <TD> 2 </TD> <TD> X B </TD> <TD> 31 </TD><TD> 15 </TD><TD> 4 </TD> </TR>
</TABLE>
</BODY>
</HTML>
Output
Observe table and write HTML code to generate it. Application Oriented Questions. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Question 5(a)

Write HTML code to create tables as shown below :

Write HTML code to create table. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Application Oriented Questions

Answer:

<HTML>
<BODY>
<TABLE BORDER = "1">
<TR> <TD> 1 </TD> <TD ROWSPAN = "2" VALIGN = "TOP"> 2 </TD><TD> 3 </TD> </TR>
<TR> <TD> 4 </TD> <TD> 6 </TD></TR>
<TR> <TD> 7 </TD> <TD> 8 </TD> <TD> 9 </TD></TR>
</TABLE>
</BODY>
</HTML>

Question 5(b)

Write HTML code to create tables as shown below :

Write HTML code to create table. Application Oriented Questions. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Application Oriented Questions

Answer:

<HTML>
<BODY>
<TABLE BORDER = "3">
<TR> <TD COLSPAN = "3"> Title goes here </TD> <TD> A </TD><TD ALIGN = "RIGHT"> B </TD> </TR>
<TR> <TD ROWSPAN = "3" ALIGN = "LEFT"> C </TD> <TD> D </TD><TD> E </TD><TD> F </TD><TD ALIGN = "RIGHT"> G </TD></TR>
<TR> <TD> H </TD><TD COLSPAN = "2" ALIGN = "CENTER"> I </TD><TD>  </TD></TR>
<TR> <TD> K </TD><TD> L </TD><TD> M </TD><TD ALIGN = "RIGHT"> J </TD></TR>
<TR> <TD ALIGN = "RIGHT"> N </TD> <TD COLSPAN = "4" ALIGN = "CENTER"> O </TD> </TR>
</TABLE>
</BODY>
</HTML>

Question 5(c)

Write HTML code to create tables as shown below :

Write HTML code to create table. Application Oriented Questions. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Application Oriented Questions

Answer:

<HTML>
<BODY>
<TABLE BORDER = "1">
<TR> <TD ROWSPAN = "3"> Column 1 </TD> <TD> Row 1 </TD> </TR>
<TR> <TD> Row 2 </TD> </TR>
<TR><TD> Row 3 </TD> </TR>
</TABLE>
</BODY>
</HTML>

Question 5(d)

Write HTML code to create tables as shown below :

Write HTML code to create table. Application Oriented Questions. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Application Oriented Questions

Answer:

<HTML>
<BODY>
<TABLE BORDER = "1">
<TR> <TH COLSPAN = "2" BGCOLOR = "YELLOW"> Mammals - Plants - Fish </TH> </TR>
<TR> <TD BGCOLOR = "SKY BLUE" ROWSPAN = "3"> <B> Mammals </B> <BR> Farm Animals <BR> Big Game <BR> Small Critters </TD> <TD BGCOLOR = "LIGHTGREEN"> Cow </TD> </TR>
<TR> <TD BGCOLOR = "LIGHTGREEN"> Pig </TD> </TR>
<TR> <TD BGCOLOR = "LIGHTGREEN"> Horse </TD> </TR>
</TABLE>
</BODY>
</HTML>

Objective Type Questions

41 questions

Question 1

To jump to new page, we use

  1. <IMG> tag
  2. <A> tag
  3. <JUMP> tag
  4. none of the above
Objective Type Questions

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
Objective Type Questions

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
Objective Type Questions

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
Objective Type Questions

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
Objective Type Questions

Answer:

name

Reason — For internal linking, the section names are provided by name attribute of <A> tag.

Question 6

............... attribute is used to specify the location of an image file.

  1. alt
  2. src
  3. align
  4. name
Objective Type Questions

Answer:

src

Reasonsrc attribute is used to specify the location of an image file.

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
Objective Type Questions

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
Objective Type Questions

Answer:

inline with text

Reason — The default alignment of images, that are inserted in the web page, is inline with text.

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
Objective Type Questions

Answer:

Pixels

Reason — While creating a Web document, pixels are used to express an image's height and width.

Question 10

The default alignment of images, that are inserted in Web page, is :

  1. Left
  2. Right
  3. Inline with text
  4. Middle
Objective Type Questions

Answer:

Inline with text

Reason — The default alignment of images, that are inserted in Web page, is inline with text.

Question 11

Border, frame, cellspacing, cellpadding, align are the attributes of :

  1. <BODY>
  2. <IMG>
  3. <TABLE>
  4. None of these
Objective Type Questions

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
Objective Type Questions

Answer:

anchor

Reason — To create a link you surround the text or image with a(n) anchor (<A>) tag.

Question 13

The correct HTML code for inserting an image is :

  1. <img href ="image.gif">
  2. <img> image.gif </gif>
  3. <image src = "image.gif">
  4. <img src = "image.gif">
Objective Type Questions

Answer:

<img src = "image.gif">

Reason — The correct HTML code for inserting an image is :

<img src = "image.gif">

Question 14

Which will let text wrap down the side of the image?

  1. <img src="myImage.gif" align="wrap">
  2. <img src="myImage.gif" align="right">
  3. <img src="myImage.gif" wrap="on">
Objective Type Questions

Answer:

<img src="myImage.gif" align="right">

Reason — 'src' attribute specifies the URL of the image file and 'align = right' tells the browser to place an image against the right margin.

Question 15

Consider the following code :

<img src ="Computers.jpg" width ="...." height ="....">

Fill in the blanks to set the image size to be 250 pixels wide and 400 pixels tall.

  1. 250, 400
  2. 400, 250
  3. <250><400>
  4. <400><250>
Objective Type Questions

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

The correct HTML code to display (P + Q)2 is:

  1. <SUB> ( P+) 2 </SUB>
  2. P+Q <SUP> 2 </SUP>
  3. (P + Q) <SUP> 2 </SUP>
  4. <SUP> (P+Q) 2 </SUP>
Objective Type Questions

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

The < ............... > tag displays text in subscript form.

  1. sub
  2. sup
  3. sups
  4. subs
Objective Type Questions

Answer:

sub

Reason — The <SUB> tag displays text in subscript form.

Question 18

The tag that starts a table cell is ............... .

  1. <table>
  2. <tc>
  3. <td>
  4. <tr>
Objective Type Questions

Answer:

<table>

Reason — The tag that starts a table cell is <table> tag.

Question 19

What tag is used to add columns to tables ?

  1. <colspan>
  2. <td>
  3. <tr>
Objective Type Questions

Answer:

<td>

Reason<td> tag is used to add columns to tables.

Question 20

Which has higher priority, cell settings or table settings ?

  1. Neither
  2. Cell settings
  3. Table settings
Objective Type Questions

Answer:

Cell settings

Reason — Cell settings have higher priority than table settings.

Question 21

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>
Objective Type Questions

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

Which of these tags are all <table> tags ?

  1. <thead><body><tr>
  2. <table><tr><td>
  3. <table><head><tfoot>
  4. <table><tr><tt>
Objective Type Questions

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).

  1. Sometimes true, sometimes not
  2. True
  3. False
Objective Type Questions

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

Which property tells how many rows a cell should span ?

  1. colspan = n
  2. Both rowspan = n and colspan = n
  3. rowspan = n
Objective Type Questions

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 ?

  1. The remote attribute
  2. A link title
  3. The Web address of the remote site
  4. An extra <a> tag
Objective Type Questions

Answer:

The Web address of the remote site

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
Objective Type Questions

Answer:

unordered

Reason — An unordered list type will create a bulleted list.

Question 27

Why is it important to specify an image width and height in an <img> tag ?

  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.
Objective Type Questions

Answer:

Specifying these dimensions helps a browser render pages faster.

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>
Objective Type Questions

Answer:

<img>

Reason<img> tag is surrounded by <a></a> container tags to create an image link .

Question 29

What is the general syntax for inline image ?

  1. <src = img>
  2. <src = image>
  3. <img = file>
  4. <img src = file>
  5. <image src = file>
Objective Type Questions

Answer:

<img src = file>

Reason — The <img> tag is used to insert images in HTML, and the "src" attribute is used to specify the path or URL of the image file. Therefore, the correct syntax for an inline image is:

<img src = file>

Question 30

To create a link to an anchor, you use the ............... property in A tag.

  1. Name
  2. Tag
  3. Link
  4. Href
Objective Type Questions

Answer:

Href

Reason — The href property in <A> tag is used to create a link to an anchor.

Question 31

Which of the following is used to specify the beginning of a table's row ?

  1. TROW
  2. TABLER
  3. TR
  4. ROW
Objective Type Questions

Answer:

TR

Reason<TR> tag is used to specify the beginning of a table's row.

Question 32

In order to add border to a table, BORDER attribute is specified in which tag ?

  1. THEAD
  2. TABLE
  3. TBORDER
  4. none of these
Objective Type Questions

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

Which of the following is an attribute of <Table> tag ?

  1. SRC
  2. LINK
  3. CELLPADDING
  4. BOLD
Objective Type Questions

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

What is the correct syntax in HTML for creating a link on a webpage ?

  1. <LINK SRC = "abc.html">
  2. <BODY LINK = "abc.html">
  3. <A SRC = "abc.html">
  4. <A HREF = "abc.html">
Objective Type Questions

Answer:

<A HREF = "abc.html">

Reason — In HTML, the <a> tag is used to create a hyperlink, or link, on a webpage. The href attribute is used within the <a> tag to specify the destination of the link.

Question 35

Choose the correct HTML code to create an email link ?

  1. <A HREF = "xx@yy.com"></A>
  2. <A HREF = "mailto:xx@yy.com"></A>
  3. <MAIL = "xx@yy.com"></MAIL>
  4. <A MAILHREF = "xx@yy.com"></A>
Objective Type Questions

Answer:

<A HREF = "mailto:xx@yy.com"></A>

Reason — In HTML, to create an email link, we need to use the mailto: protocol followed by the email address. This protocol tells the browser to open the default email client with a new message addressed to the specified email address.

Question 36

............... attribute is used with <A> tag to specify the URL of link.

Objective Type Questions

Answer:

href attribute is used with <A> tag to specify the URL of link.

Question 37

No value is specified with ALT attribute of <IMG> tag. (T/F)

Objective Type Questions

Answer:

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)

Objective Type Questions

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)

Objective Type Questions

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)

Objective Type Questions

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

BORDER is an attribute of <A> tag. (T/F)

Objective Type Questions

Answer:

False

Reason — BORDER is an attribute of <TABLE> tag.

Practical Assessment

9 questions

Question 1

How to create hyperlinks.

<HTML> 
<BODY> 
<P>
<A href = "lastpage.htm">This text</A> is a link to a page on this Web site.</P>
<P>
<A href="http://www.microsoft.com/">
This text</A> is a link to a page on the World Wide Web.
</P>
</BODY>
</HTML>
Practical Assessment

Answer:

Output
How to create hyperlinks. Practical Assessment. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Question 2

Jump to another part of same document.

<HTML>
<BODY>
<P>
<A href = "#C4">
See also Chapter 4.
</A>
</P>
<P>
<H2>Chapter 1</H2>
<P>This chapter explains ba bla bla</P> 
<H2>Chapter 2</H2>
<P>This chapter explains ba bla bla</P> 
<H2>Chapter 3</H2>
<P>This chapter explains ba bla bla</P> 
<A name="C4"><H2>Chapter 4</H2></A> 
<P>This chapter explains ba bla bla</P> 
<H2>Chapter 5</H2>
<P>This chapter explains ba bla bla</P> 
<H2>Chapter 6</H2>
<P>This chapter explains ba bla bla</P> 
<H2>Chapter 7</H2>
<P>This chapter explains ba bla bla</P> 
</BODY>
</HTML>
Practical Assessment

Answer:

Output
Jump to another part of same document. Practical Assessment. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Question 3

Create a basic 3x2 table.

<HTML>
<BODY>
<TABLE BORDER>
<TR>
<TD>A</TD> <TD>B</TD> <TD>C</TD> 
</TR>
<TR>
<TD>D</TD> <TD>E</TD> <TD>F</TD> 
</TR>
</TABLE>
</BODY>
</HTML>
Practical Assessment

Answer:

Output
Create a basic 3x2 table. Practical Assessment. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Question 4

Demonstration of rowspan.

<HTML>
<BODY>
<TABLE BORDER>
<TR>
<TD ROWSPAN=2>Item 1</TD>
<TD>Item 2</TD> <TD>Item 3</TD> 
<TD>Item 4</TD>
</TR>
<TR>
<TD>Item 5</TD> <TD>Item 6</TD> 
<TD>Item 7</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Practical Assessment

Answer:

Output
Demonstration of rowspan. Practical Assessment. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Question 5

Demonstration of colspan and headers.

<HTML>
<BODY>
<TABLE BORDER>
<TR>
<TH COLSPAN=2>Head1</TH> <TH COLSPAN=2>Head2</TH> 
</TR>
<TR>
<TD>A</TD> <TD>B</TD> 
<TD>C</TD> <TD>D</TD> 
</TR>
<TR>
<TD>E</TD> <TD>F</TD> 
<TD>G</TD> <TD>H</TD> 
</TR>
</TABLE>
</BODY>
</HTML>
Practical Assessment

Answer:

Output
Demonstration of colspan and headers. Practical Assessment. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Question 6

Demonstration of Side Headers, Rowspan.

<HTML> 
<BODY> 
<TABLE BORDER>
<TR><TH ROWSPAN=2>Head1</TH>
<TD>Item 1</TD> <TD>Item 2</TD> 
<TD>Item 3</TD> <TD>Item 4</TD> 
</TR>
<TR>
<TD>Item 5</TD> <TD>Item 6</TD> 
<TD>Item 7</TD> <TD>item8</TD> 
</TR>
<TR><TH>Head2</TH>
<TD>Item 9</TD> <TD>Item 10</TD> 
<TD>Item 3</TD> <TD>Item 11</TD> 
</TR>
</TABLE>
</BODY>
</HTML>
Practical Assessment

Answer:

Output
Demonstration of Side Headers, Rowspan. Practical Assessment. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Question 7

Sample table using many things.

<HTML>
<BODY>
<TABLE BORDER>
<TR> <TD><TH ROWSPAN=2></TH> 
<TH COLSPAN=2>Average</TH></TD>
</TR>
<TR>
<TD><TH>Height</TH>
<TH>Weight</TH></TD>
</TR>
<TR>
<TH ROWSPAN=2>Gender</TH>
<TH>Males</TH><TD>1.9</TD> 
<TD>0.003</TD>
</TR>
<TR>
<TH>Females</TH>
<TD>1.7</TD><TD>0.002</TD> </TR>
</TABLE>
</BODY>
</HTML>
Practical Assessment

Answer:

Output
Sample table using many things. Practical Assessment. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Question 8

Tables using Cellpadding and Cellspacing.

<HTML>
<BODY>
<TABLE BORDER CELLPADDING=10 CELLSPACING=0>
<TR>
<TD>A</TD> <TD>B</TD> <TD>C</TD>
</TR> 
<TR>
<TD>D</TD> <TD>E</TD> <TD>F</TD>
</TR> 
</TABLE> 
<TABLE BORDER CELLPADDING=0 CELLSPACING=10>
<TR>
<TD>A</TD> <TD>B</TD> <TD>C</TD>
</TR>
<TR>
<TD>D</TD> <TD>E</TD> <TD>F</TD>
</TR>
</TABLE>
<TABLE BORDER CELLPADDING=20 CELLSPACING=20>
<TR>
<TD>A</TD> <TD>B</TD> <TD>C</TD>
</TR>
<TR>
<TD>D</TD> <TD>E</TD> <TD>F</TD>
</TR>
</TABLE>
<TABLE BORDER=5 CELLPADDING=20 CELLSPACING=5>
<TR>
<TD>A</TD> <TD>B</TD> <TD>C</TD>
</TR>
<TR>
<TD>D</TD> <TD>E</TD> <TD>F</TD>
</TR>
</TABLE> 
</BODY> 
</HTML>
Practical Assessment

Answer:

Output
Tables using Cellpadding and Cellspacing. Practical Assessment. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Question 9

Table with different vertical alignments in its cells.

<HTML> 
<BODY> 
<TABLE BORDER>
<TR>
<TH>January</TH>
<TH>February</TH>
<TH>March</TH>
</TR>
<TR ALIGN=center>
<TD>all aligned center</TD>
<TD>Cell 2</TD>
<TD>Another cell,<br> cell 3</TD>
</TR>
<TR>
<TD ALIGN=right>aligned right</TD>
<TD ALIGN=center>aligned to center</TD> 
<TD>default,<br>aligned left</TD>
</TR>
</TABLE> 
</BODY> 
</HTML>
Practical Assessment

Answer:

Output
Table with different vertical alignments in its cells. Practical Assessment. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Solutions of Unsolved Examination Questions

27 questions

Question 1

Fill in the blanks:

(i) To insert a table on a web page, we use ............... tag.

(ii) ............... tag is used to create inline images.

(iii) ............... is an attribute of the <IMG> tag which specifies the location or URL of the image to be displayed.

(iv) The default colour of a hyperlink on a web page is ............... .

(v) The ............... tag is used to create subscripts and ............... tag is used to create superscripts on a web page.

(vi) An ............... link allows a link to another web page or another web site.

(vii) The attribute ............... is used for specifying the URL of the anchor tag.

(viii) ............... is used to combine the cells horizontally.

(ix) ............... tags creates a bulleted list.

(x) ............... attribute with <HR> tag is used to specify thickness of the line.

Solutions of Unsolved Examination Questions

Answer:

(i) To insert a table on a web page, we use <TABLE>tag.

(ii) <IMG> tag is used to create inline images.

(iii) SRC is an attribute of the <IMG> tag which specifies the location or URL of the image to be displayed.

(iv) The default colour of a hyperlink on a web page is blue.

(v) The <SUB> tag is used to create subscripts and <SUP> tag is used to create superscripts on a web page.

(vi) An external link allows a link to another web page or another web site.

(vii) The attribute HREF is used for specifying the URL of the anchor tag.

(viii) COLSPAN is used to combine the cells horizontally.

(ix) <UL>...</UL> tags creates a bulleted list.

(x) SIZE attribute with <HR> tag is used to specify thickness of the line.

Question 2

State True or False:

(i) Line breaks are given through <BR>.

(ii) HTML is a programming language.

(iii) The default font size is 5.

(iv) Color attribute is used with <P> tag.

(v) The colour of the hyperlinks in an HTML document cannot be changed.

(vi) The <A> tag is called the align tag.

(vii) <TR> tag is used to specify the individual table data in a table.

(viii) The ALT attribute of the <IMG> tag is used to specify the text that is to be displayed in case the browser does not support graphics.

(ix) XML is not a markup language.

(x) It is not important to specify an integer value as the width of the border of an image.

(xi) The ALIGN attribute of the <IMG> tag is used to specify the text that is to be displayed in case the browser does not support graphics.

(xii) <TH> tag is used to specify the column heading in a table.

(xiii) The NAME attribute of the <A> tag allows the user to create links within the same document.

(xiv) The <A> tag is called the align tag.

Solutions of Unsolved Examination Questions

Answer:

(i) True
Reason<BR> tag is used to break the current line and jump to the next line.

(ii) False
Reason — HTML is a Webpage Layout Language and a Hyperlink Specification Language. It is not a programming language.

(iii) False
Reason — The default font size is 3.

(iv) False
Reason — Color is not an attribute of <P> tag. Color is used with <Font> tag to set the colour of the text.

(v) False
Reason — The colour of the hyperlinks in an HTML document can be changed by using the ALINK, VLINK attributes with the <BODY> tag.

(vi) False
Reason — The <A> tag is called the anchor tag.

(vii) False
Reason<TD> tag is used to specify the individual table data in a table. <TR> tag is used to specify a new row in a table.

(viii) True
Reason — The ALT attribute of the <IMG> tag is used to specify the text that is to be displayed in case the browser cannot display the image for some reason.

(ix) False
Reason — XML stands for Xtensible Markup Language and it is a markup language.

(x) False
Reason — The width attribute requires an integer value that indicates the image size in pixels.

(xi) False
Reason — The ALT attribute of the <IMG> tag is used to specify the text that is to be displayed in case the browser does not support graphics. The ALIGN attribute is used to align the image.

(xii) True
Reason<TH> tag is used to specify the column heading in a table. The headings appear slightly different than the normal table data.

(xiii) True
Reason — The NAME attribute specifies the name of a section in the document. This name is used to create links using the HREF attribute.

(xiv) False
Reason — The <A> tag is called the anchor tag.

Question 3(i)

To create a link, we must use ............... attribute with tag.

  1. name
  2. link
  3. tag
  4. href
Solutions of Unsolved Examination Questions

Answer:

href

Reason — For linking to another web page, its URL is specified with href attribute of <A> tag.

Question 3(ii)

Which of the following is an attribute of <table> tag ?

  1. src
  2. link
  3. cellpadding
  4. bold
Solutions of Unsolved Examination Questions

Answer:

cellpadding

Reason — Cellpadding gives the specified amount of space between the cell border and the cell contents.

Question 3(iii)

Which attribute is not valid for <body> tag ?

  1. background
  2. color
  3. vlink
  4. leftmargin
Solutions of Unsolved Examination Questions

Answer:

color

Reasoncolor is not a valid attribute for <body> tag. The other attributes are used with <BODY> tag to specify the following —

  1. background — It specifies the background image for the document
  2. vlink — It specifies the color of the visited links in a document
  3. leftmargin — It specifies the left margin in a document

Question 3(iv)

Which of the following is not an attribute of <Table> tag ?

  1. Border
  2. Background
  3. Bgcolor
  4. Src
Solutions of Unsolved Examination Questions

Answer:

Src

ReasonSrc is an attribute of <IMG> tag which accepts the path or URL of the image. The BORDER, BACKGROUND and BGCOLOR attribute of <TABLE> tag specify the border, background image and the background colour of the table, respectively.

Question 3(v)

Which command should we use to link a page with an HTML page ?

  1. <a link = "page.htm"> </a>
  2. <a href = "page.htm"> page </a>
  3. <a connect = "page.htm"> </a>
  4. <a attach = "page.htm"> </a>
Solutions of Unsolved Examination Questions

Answer:

<a href = "page.htm"> page </a>

Reason — To link a page with an HTML page, its name and location is specified with href attribute of <A> tag.

Question 3(vi)

SRC attribute used with <IMG> tag stands for :

  1. Screen
  2. Screen resolution count
  3. Source
  4. Structure
Solutions of Unsolved Examination Questions

Answer:

Source

Reason — SRC attribute is used to specify the source/location of an image file.

Question 3(vii)

Which of the following is not a valid value for align attribute of <IMG> tag ?

  1. top
  2. center
  3. bottom
  4. middle
Solutions of Unsolved Examination Questions

Answer:

center

Reason — The align attribute of <IMG> tag takes top, middle and bottom values. 'center' is not a valid value.

Question 3(viii)

We can create a numbered list using ............... tag.

  1. <ul>
  2. <list>
  3. <ol>
  4. <dl>
Solutions of Unsolved Examination Questions

Answer:

<ol>

Reason — The <ol> tag is used to define a numbered or ordered list

Question 3(ix)

colspan = n can be added to ............... tag :

  1. <hr>
  2. <table>
  3. <td>
  4. <tr>
Solutions of Unsolved Examination Questions

Answer:

<td>

Reason — COLSPAN attribute is used with <TD> tag to merge more than one columns into a single cell.

Question 3(x)

The correct HTML code for inserting an image is :

  1. <img href = "image.gif">
  2. <img> image.gif </img>
  3. <img src = "image.gif">
  4. <image src = "image.gif">
Solutions of Unsolved Examination Questions

Answer:

<img src = "image.gif">

Reason — To insert an image in an HTML document, we use the <IMG> tag along with its attribute SRC which specifies the location or URL of the image.

Question 3(xi)

Which of the following are the attributes of <table> ?

  1. <Border>
  2. <img>
  3. <table>
  4. None of these
Solutions of Unsolved Examination Questions

Answer:

None of these

Reason — The options specified are HTML tags not attributes.

Question 3(xii)

The attribute used to specify the background colour of a table is :

  1. COLOR
  2. BGTABLE
  3. BACKCOLOR
  4. BGCOLOR
Solutions of Unsolved Examination Questions

Answer:

BGCOLOR

Reason — The attribute BGCOLOR is used to specify the background colour of a table.

Question 3(xiii)

Which of the following is an attribute of <TABLE> tag ?

  1. SRC
  2. LINK
  3. CELLPADDING
  4. BOLD
Solutions of Unsolved Examination Questions

Answer:

CELLPADDING

Reason — Cellpadding specifies the amount of space to be given between the cell border and the cell contents.

Question 3(xiv)

Which of the following tag is suitable for creating numbered list ?

  1. <BL>
  2. <OL>
  3. <UL>
  4. <DL>
Solutions of Unsolved Examination Questions

Answer:

<OL>

Reason<OL> tag is suitable for creating numbered list.

Question 3(xv)

The two common attributes of the <IMG> and the <TABLE> tag are :

  1. SRC and HEIGHT
  2. HEIGHT and WIDTH
  3. BORDER and SRC
  4. They do not have any common attributes
Solutions of Unsolved Examination Questions

Answer:

HEIGHT and WIDTH

Reason — Two common attributes of the <IMG> and the <TABLE> tag are HEIGHT and WIDTH.

Question 4(a)

Write the full forms of :

(i) XML

(ii) FTP

(iii) <img>

(iv) <HR>

Solutions of Unsolved Examination Questions

Answer:

(i) XML — Xtensible Markup Language

(ii) FTP — File Transfer Protocol

(iii) <img> — Image tag

(iv) <HR> — Horizontal rule tag

Question 4(b)

Name the attributes of <img> tag which are used for specifying its dimensions in a web page.

Solutions of Unsolved Examination Questions

Answer:

The HEIGHT and WIDTH attributes require integer values to specify the height and width of the image in pixels.

Question 5

What do you understand by VLINK ?

Solutions of Unsolved Examination Questions

Answer:

VLINK is an attribute of <BODY> tag. It specifies the color of the visited links in a document.

Question 6

Identify which of the following is a tag or an attribute :

(i) border

(ii) img

(iii) alt

(iv) src

(v) href

Solutions of Unsolved Examination Questions

Answer:

(i) border — Attribute

(ii) img — Tag

(iii) alt — Attribute

(iv) src — Attribute

(v) href — Attribute

Question 7

Consider the HTML code :

<A HREF = #intro> Introduction </A>

In the above code,

(i) What is the purpose of # ?

(ii) What will happen when the user clicks "Introduction" ?

Solutions of Unsolved Examination Questions

Answer:

(i) # is used to place the anchor at a given section in a document.

(ii) When "Introduction" is clicked, the user is taken to the section of the document named "intro".

Question 8(a)

Observe the following table and write the HTML code to generate it :

Write code to produce this HTML table. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Solutions of Unsolved Examination Questions

Answer:

<HTML>
<BODY>
<TABLE BORDER="1">
<TR> <TH COLSPAN = "4" ALIGN = "CENTER">Marks</TH> </TR>
<TR> 
<TD ALIGN = "CENTER"> English </TD> 
<TD ALIGN = "CENTER"> Maths </TD> 
<TD ALIGN = "CENTER"> Economics </TD> 
<TD ALIGN = "CENTER"> Physics </TD>
</TR>
<TR> 
<TD ALIGN = "CENTER"> 67 </TD> 
<TD ALIGN = "CENTER"> 89 </TD> 
<TD ALIGN = "CENTER"> 77 </TD> 
<TD ALIGN = "CENTER"> 92 </TD>
</TR>
</TABLE>
</BODY>
</HTML>

Question 8(b)

Write the names of two attributes each for the following tags :

(i) <HR>

(ii) <Body>

(iii) <img>

(iv) <Table>

(v) <A>

Solutions of Unsolved Examination Questions

Answer:

(i) <HR> — WIDTH, NOSHADE

(ii) <Body> — BGCOLOR, BACKGROUND

(iii) <img> — SRC, ALT

(iv) <Table> — BORDER, ALIGN

(v) <A> — NAME, HREF

Question 9

Observe the following table and write the HTML code to generate it :

Write code to produce this HTML table. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Note. 1st row has pink background.

Solutions of Unsolved Examination Questions

Answer:

<HTML>
<BODY>
<TABLE BORDER="1">
<TR>
<TH BGCOLOR = "PINK" ALIGN = "CENTER">Question</TH>
<TH BGCOLOR = "PINK" ALIGN = "CENTER">Marks</TH>
</TR>
<TR>
<TD ROWSPAN = "3" ALIGN = "CENTER">1</TD>
<TD ALIGN = "CENTER">2</TD>
</TR>
<TR>
<TD ALIGN = "CENTER">2</TD>
</TR>
<TR>
<TD ALIGN = "CENTER">5</TD>
</TR>
</TABLE>
</BODY>
</HTML>

Question 10

Write the HTML code to generate the following output :

Write HTML code. Link colour is green, active link colour is blue and visited link colour is red. Title of the page is Dances of India. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Note the following points while generating the webpage :

(i) Link colour is green, active link colour is blue and visited link colour is red.

(ii) Title of the page is "Dances of India".

(iii) Heading of the page is maroon.

(iv) Background colour of page is yellow.

(v) Image used is "dance.png".

(vi) Caption of table is blue.

(vii) Table border is blue and of size 2.

(viii) The 3 links are one.html, two.html and three.html.

(ix) The email id for contact us is abc@xyz.com

Solutions of Unsolved Examination Questions

Answer:

<HTML>
<HEAD>
<TITLE> Dances of India </TITLE>
</HEAD>
<BODY LINK = "GREEN" ALINK = "BLUE" VLINK = "RED" BGCOLOR = "YELLOW">
<FONT COLOR = "MAROON">
<H1 ALIGN = "CENTER">Dances of India </H1>
</FONT>
<IMG SRC = "DANCE.JPG" HEIGHT = "100" WIDTH = "100" ALIGN = "RIGHT">

<P>
There are many types of dance in India, from those which are deeply religious in content to those which are danced on more trivial happy occasions. <BR> 
Classical dances of India are usually always spiritual in content, although this is often true also of Folk dances.
</P>

<TABLE BORDER = "2" BORDERCOLOR = "BLUE" ALIGN = "CENTER">
<CAPTION>
<FONT COLOR = "BLUE">DANCES OF INDIA</FONT>
</CAPTION>
<TR> 
<TH ALIGN = "CENTER">CLASSICAL DANCES </TH> 
<TH ALIGN = "CENTER">FOLK DANCES </TH>
</TR>
<TR>
<TD>Mohini Attam</TD>
<TD>Hikat of Himachal Pradesh </TD>
</TR>
<TR>
<TD>Bharata Natyam </TD>
<TD>Rouff of Kashmir </TD>
</TR>
<TR>
<TD>Odissi </TD>
<TD>Hurkia Baol of Kumaon </TD>
</TR>
</TABLE>

<H4>List</H4>

<UL TYPE = "NONE">
<LI> 
<A HREF = "one.html">Mohini Attam</A>
</LI>
<LI>
<A HREF = "two.html">Bharata Natyam</A>
</LI>
<LI>
<A HREF = "three.html">Odissi</A>
</LI>
<LI>
<A HREF = "mailto:abc@xyz.com">Contact Us</A>
</LI>
</UL>
</BODY>
</HTML>

Question 11

Write the HTML code to generate the following output :

Title of the page should be Dubai Tourism. The heading text Welcome to Dubai is in Arial font and is of maroon color. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Note the following points while generating the webpage :

(i) Title of the page should be "Dubai Tourism".

(ii) The heading text "Welcome to Dubai" is in Arial font and is of maroon color.

(iii) The horizontal lines below the heading are 5 pixels thick and of red color.

(iv) Image used in the page is burj.jpg.

(v) The bulleted list contains links as specified below :

  • The text Morning is a link to the webpage "morning.html".
  • The text Evening is a link to the webpage "evening.html".
Solutions of Unsolved Examination Questions

Answer:

<HTML>
<HEAD>
<TITLE> Dubai Tourism </TITLE>
</HEAD>
<BODY >
<FONT FACE = "ARIAL" COLOR = "MAROON">
<H1 ALIGN = "CENTER">WELCOME TO DUBAI </H1>
</FONT>

<HR SIZE = "5" COLOR = "RED" ALIGN = "CENTER" WIDTH = "50%">
<HR SIZE = "5" COLOR = "RED" ALIGN = "CENTER" WIDTH = "30%">

<FONT SIZE = 5>
Enjoy the world of pure travel masti
</FONT>
<IMG SRC = "BURJ.JPG" HEIGHT = "100" WIDTH = "100" ALIGN = "BOTTOM">
<P>The following is a list of major tourist attractions in Dubai :</P>
<UL TYPE = "DISC">
<LI> 
<A HREF = "morning.html">Morning</A> - Dolphinarium and Palm Dubai
</LI>
<LI>
<A HREF = "evening.html">Evening</A> - Ski Dubai and Cruise
</LI>
</UL>

<CENTER>For enquiries write at <A HREF = "mailto:dubai@gmail.com">dubai@gmail.com</A></CENTER>
</BODY>
</HTML>

Theoretical Questions

39 questions

Question 1

What is meant by inline images in HTML ?

Theoretical Questions

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

Name various types of alignments available for images.

Theoretical Questions

Answer:

The various types of alignments available for images are:

  1. Top alignment
  2. Middle alignment
  3. Bottom alignment
  4. Left and Right alignment

Question 3

Which attributes of <A> facilitates external linking ?

Theoretical Questions

Answer:

The attributes of <A> tag which facilitate external linking are:

  1. href — It is used to specify the URL of the target of the link.
  2. title — It specifies a title for the document to which one is linking.

Question 4

Which attribute of <A> facilitates internal linking ?

Theoretical Questions

Answer:

The attributes of <A> tag which facilitate internal linking are:

  1. name — It is used to identify a segment of the document to which a link is to be established.
  2. href — It is used to link to the named section.

Question 5

What for is Mailto function used ?

Theoretical Questions

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

Write HTML code to create the following ordered list :

    X. Xylophone
    Y. Yak
    Z. Zebra

Theoretical Questions

Answer:

<OL TYPE = "A" START = "24">
<LI> Xylophone </LI>
<LI> Yak </LI>
<LI> Zebra </LI>
</OL>

Question 7

How would you indent a single word and put a square bullet in front of it ?

Theoretical Questions

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:

<UL TYPE = "SQUARE">
<LI> Word </LI>
</UL>

Question 8

Write the HTML code to create the following indentation effect :

Apple pie,
pudding,
and pancake,
All begin with an A.
Theoretical Questions

Answer:

Apple pie, <BR>  
pudding, <BR>
and pancake, <BR>
All begin with an A.

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."

Theoretical Questions

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 ?

Theoretical Questions

Answer:

We can do this by setting the value of alt attribute to 'Elephant' in the following way:

<IMG SRC = "ELEPHANT.JPG" ALT = "ELEPHANT">

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.

Theoretical Questions

Answer:

<H1>Elephants of the World Unit!<IMG SRC = "ELEPHANT.JPG" ALIGN = "RIGHT"></H1>

Question 12

How would you insert an image file named elephant.jpg at the very top of a Web page ?

Theoretical Questions

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.

Theoretical Questions

Answer:

The HTML code to perform the given task is as follows:

<IMG SRC = "FLY.JPG" ALIGN = "TOP"><IMG SRC = "ELEPHANT.JPG"><IMG SRC = "MOUSE.JPG" ALIGN = "BOTTOM">

Question 14

Your home page will be at http://www.mysite.com/home.htm when you put it on the Internet. Write the HTML code to go on that page so that when someone clicks the words All About Me, they see the page located at http://www.mysite.com/mylife.htm.

Theoretical Questions

Answer:

The command to perform the given task is as follows:

<A HREF = "mylife.htm"> All About Me </A>

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 ?

Theoretical Questions

Answer:

<A HREF = "mains/kolkata.htm"> Kolkata </A>

Question 16

Name the following with respect to HTML :

Element to create a hyperlink.

Theoretical Questions

Answer:

Anchor tag <A>...</A>

Question 17

What is a table ? Which tag is used to create tables in HTML ?

Theoretical Questions

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.

The table tag <TABLE>...</TABLE> is used to create tables in HTML.

Question 18

Which attributes are used to give border to a table ?

Theoretical Questions

Answer:

The attributes which are used to give border to a table are:

  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 ?

Theoretical Questions

Answer:

Frame attribute lets us control the display of select border sides of a table.

Question 20

Which attribute is used to control the inside table border ?

Theoretical Questions

Answer:

Rules attribute is used to control the inside table border.

Question 21

How is spacing in cells of table controlled ?

Theoretical Questions

Answer:

To control the spacing of cells, the 'Cellspacing' and 'Cellpadding' attributes are used.

  1. Cellspacing — It gives the amount of space between cells.
  2. Cellpadding — It gives the amount of space between the cell border and the cell contents.

Consider the following example:

<TABLE BORDER = "3" CELLSPACING = "1" CELLPADDING = "1">
<TR> <TD> Fruits </TD> <TD> Vegetables </TD> </TR>
<TR> <TD> Mango, Apple, Banana </TD> <TD> Potato, Aubergine, Gourd  </TD> </TR>
</TABLE>

Question 22

What is the role of ALIGN attribute of <TABLE> tag ?

Theoretical Questions

Answer:

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

What is the use of having a SUMMARY attribute in <TABLE> tag ?

Theoretical Questions

Answer:

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

How can you specify following in a table :

(i) background image

(ii) background colour

(iii) table height

(iv) table width ?

Theoretical Questions

Answer:

(i) background attribute is used to specify the background image in a table.

(ii) bgcolor attribute is used to specify the background color in a table.

(iii) height attribute is used to specify the height of a table.

(iv) width attribute is used to specify the width fo a table.

Question 25

Which tag is used to specify

(i) table data ?

(ii) table header ?

(iii) table row ?

Theoretical Questions

Answer:

(i) <TD> tag

(ii) <TH> tag

(iii) <TR> tag

Question 26

Name the attributes used for following :

(i) Setting the cell width

(ii) Setting cell's background image

(iii) Setting cell's background colour

(iv) Changing the cell span

(v) Aligning cell contents vertically.

Theoretical Questions

Answer:

(i) width

(ii) background

(iii) bgcolor

(iv) rowspan and colspan

(v) valign

Question 27

What for are <TH> and <TR> tags used ?

Theoretical Questions

Answer:

<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

A set of header rows is defined using ............... tag.

Theoretical Questions

Answer:

A set of header rows is defined using <THEAD> tag.

Question 29

Which tags divide HTML tables in multiple sections ?

Theoretical Questions

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 ?

Theoretical Questions

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

Can you insert hyperlinks inside table cells ?

Theoretical Questions

Answer:

Yes, we can insert hyperlinks inside table cells by using the anchor tag <A>...</A>.

Question 32

How do you create different table section ?

Theoretical Questions

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

Write code to produce following HTML table :

Write code to produce this HTML table. Theoretical Questions. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Theoretical Questions

Answer:

<HTML>
<BODY>
<TABLE>
<TR> <TD ROWSPAN = "2"> A </TD> <TD> B </TD> </TR>
<TR> <TD> C </TD> </TR>
</TABLE>
</BODY>
</HTML>

Question 34

Write HTML code to produce following table :

Write code to produce this HTML table. Theoretical Questions. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Theoretical Questions

Answer:

<HTML>
<BODY>
<TABLE frame = "void" rules = "all">
<TR> <TD> A </TD> <TD> D </TD> </TR>
<TR> <TD> B </TD> <TD> E </TD> </TR>
<TR> <TD> C </TD> <TD> F </TD> </TR>
</TABLE>
</BODY>
</HTML>

Question 35

Write HTML code to produce following table :

Write code to produce this HTML table. Theoretical Questions. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Theoretical Questions

Answer:

<HTML>
<BODY>
<TABLE frame = "lhs" rules = "all">
<TR> <TD> A </TD> <TD> C </TD><TD> E </TD> </TR>
<TR> <TD> B </TD> <TD> D </TD> <TD> F </TD></TR>
</TABLE>
</BODY>
</HTML>

Question 36

Write HTML code to produce following table :

Write code to produce this HTML table. Theoretical Questions. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Theoretical Questions

Answer:

<HTML>
<BODY>
<TABLE frame = "above" rules = "all">
<TR> <TD> A </TD> <TD>  B</TD><TD> C </TD> <TD> D </TD></TR>
<TR> <TD> E </TD> <TD> F </TD> <TD> G </TD> <TD> H </TD></TR>
</TABLE>
</BODY>
</HTML>

Question 37

Create a table having three header rows with yellow background colour, five table-body rows having pink colour and two footer rows having cyan colour. Assume table contents on your own.

Theoretical Questions

Answer:

<HTML>
<BODY>
<TABLE>
<THEAD>
<TR> <TD BGCOLOR = "YELLOW"> Names </TD> </TR>
<TR> <TD BGCOLOR = "YELLOW"> Of </TD> </TR>
<TR> <TD BGCOLOR = "YELLOW"> Fruits </TD> </TR>
</THEAD>
<TBODY>
<TR> <TD BGCOLOR = "PINK"> Apple </TD> </TR>
<TR> <TD BGCOLOR = "PINK"> Mango  </TD> </TR>
<TR> <TD BGCOLOR = "PINK"> Banana </TD> </TR>
<TR> <TD BGCOLOR = "PINK"> Guava </TD> </TR>
<TR> <TD BGCOLOR = "PINK"> Pineapple </TD> </TR>
</TBODY>
<TFOOT>
<TR> <TD BGCOLOR = "CYAN"> Note  </TD> </TR>
<TR> <TD BGCOLOR = "CYAN"> Fruits are rich in fibre. </TD> </TR>
</TFOOT>
</TABLE>
</BODY>
</HTML>
Output
Create a table having three header rows with yellow background colour, five table-body rows having pink colour and two footer rows having cyan colour. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.

Question 38

Write code to produce following HTML tables :

Write code to produce this HTML table. Theoretical Questions. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Theoretical Questions

Answer:

(i)

<HTML>
<BODY>
<TABLE frame = "border" rules = "cols">
<TR> <TD> A </TD> <TD> B </TD><TD> C </TD> </TR>
<TR> <TD> D </TD> <TD> E </TD> <TD> F </TD></TR>
</TABLE>
</BODY>
</HTML>

(ii)

<HTML>
<BODY>
<TABLE frame = "border" rules = "none">
<TR> <TD> A </TD> <TD> B </TD><TD> C </TD> <TD> D </TD></TR>
<TR> <TD> E </TD> <TD> F </TD> <TD> G </TD><TD> H </TD></TR>
</TABLE>
</BODY>
</HTML>

Question 39

Write code to produce following HTML table :

Write code to produce this HTML table. Theoretical Questions. HTML Images, Links & Tables, Computer Applications Code 165 Sumita Arora Solutions CBSE Class 10.
Theoretical Questions

Answer:

<HTML>
<BODY>
<TABLE>
<TR ALIGN = "CENTER">
    <TD> A </TD>
    <TD COLSPAN = "3"> B </TD>
</TR>
<TR ALIGN = "CENTER">
    <TD> C </TD>
    <TD> D </TD>
    <TD> E </TD>
    <TD ROWSPAN = "2"> H </TD>
</TR>
<TR ALIGN = "CENTER">
    <TD> C </TD>
    <TD COLSPAN = "2"> H </TD>
</TR>
</TABLE>
</BODY>
</HTML>