Professional Documents
Culture Documents
Exercise & Question Answers Class X
Exercise & Question Answers Class X
Exercise & Question Answers Class X
Chapter 4
Class X
D. Short answer questions:
Ans. The HTML table model allows authors to arrange data -- text, preformatted text, images, links,
forms, form fields, other tables, etc. -- into rows and columns of cells. Each table may have an associated
caption that provides a short description of the table's purpose.
Syntax: <a href=file name with extension which we want to link><img src=”image name with extension
which we want to show as link”></a>
Ans. An external link is used to interconnect two html webpages. When you want to navigate to some
other page or any other URL by clicking on a link on webpage, external links are created. An external link
can be created by using anchor tag in html web page.
d) What is a Hyperlink?
Ans. A hyperlink is an element in an HTML document that links to either another portion of the
document or to another document altogether. On webpages, hyperlinks are usually colored purple or
blue and are sometimes underlined, they can be in form of image.
Ans. <td> tag is container tag. It is used to create column cells to define the table data. By default the
cell data is left aligned horizontally and center aligned vertically.
f) What is cellpadding?
Ans. Cellpadding is an attributes of table tag. It is used to increase space between cell borders and
content within cells.
g) What is the use of colspan and rowspan attributes of the <TD> tag?
Ans. The rowspan and colspan are the attributes of <td> tag. These are used to specify the number of
rows or columns a cell should span. The rowspan attribute is for rows and the colspan attribute is for
columns.
Ans. Bgcolor attribute is used to apply background color in whole table or desired rows or desired cells
while bordercolor attribute is used to change the color of table borders.
Ans. <th> tag is container tag. It is used to create column cells to define the coloumn heading in table.
By default the cell heading text is bold and aligned to the center (horizontally & vertically both).
a) Which attribute of the table tag is used to add an image in the background give the syntax?
Ans. Background attribute is used to set background image for whole table or just for one cell.
Ans. The cellspacing attribute defines space between table cells, while cellpadding represents the
distance between cell borders and the content within a cell.
Ans. Align attribute aligns the text in cell horizontally, i.e. left or center or right, default alignment is left
while valign aligns the text vertically, i.e. top or middle or bottom, default alignment is middle.
Example of align:
Example of valign:
d) How can you create an internal link? Give the two steps.
Ans. To create a link within the page, two HTML tags are required.
First create a link or fragment (bookmarks) at the place where we want to reach within a
webpage and name it using <a…> tag. It will create a bookmark. We can use the name or id
attribute to name the fragment.
Second step is to create a hyperlink to the Fragment in the document.
We must start the link with a # (pound symble) which indicates the name part to be used in the
second tag.
Example:
<a href=”#top”>Top</a>
When user clicks on the “Top” link, the browser would then go to the name tag, if found on the same
page of the link.
External Linking-
The external linking means linking two different webpages. When we create a hyperlink that on clicking
directs us to some another web page or some another website, it is known as external linking between
the webpages.
For Example – On a website there may be the different external links as- website link audio link, video
link, for going to another webpage on same website.
Internal linking-
Sometime the page or document on the website is long and we have to scroll up and down to view the
content, for this purpose we can create links within a chapter or a page, so that we can click on the link
and reach that part of the page. This is called as Internal Linking.
For Example- Wikipedia is a single page website with different types of contents, so to reach to desire
content there are created many internal links.
f) What are the different values that align attribute of the table tag can have? Explain their effect
briefly.
Ans. Align attribute of Table tag can have three values-left, center or right, default alignment is left.
Explanation:
Right alignment-
g) In how many ways can you add CSS to an HTML file? Explain briefly.
External Stylesheet- defines style sheet rules in a separate .css file and then include that file in
HTML document using HTML <link> tag.
Internal Style Sheet- Define style sheet rules in header section of the HTML document using
<style> tag.
Inline Style Sheet- Define style rules directly along with the HTML elements using style attribute.
h) Reema has written the code given below to add an image to the table as follows, but she is not
able to get the image in the table. Locate the error and make the connection.
<Table background=”balloons.gif”>