Computer Applications
Shivam has been given an assignment by her class teacher to design a table in such a way that the amount of space between its cell borders and cell data is 5 pixels and distance between any two cells is 3 pixels. Which attributes can she use to accomplish the task?
HTML Advanced Features
10 Likes
Answer
Shivam can use Cellspacing attribute of <TABLE>
element to set the distance between any two cells and Cellpadding attribute of <TABLE>
element to set the amount of space between its cell borders and cell data. Consider the following example,
<TABLE BORDER = "1" CELLSPACING = "3" CELLPADDING = "5">
<TR>
<TD> Fruits </TD>
<TD> Vegetables </TD>
</TR>
<TR>
<TD> Mango</TD>
<TD> Potato</TD>
<TR>
<TD>Guava </TD>
<TD>Aubergine </TD>
</TR>
<TR>
<TD>Banana </TD>
<TD>Cauliflower </TD>
</TR>
</TR>
</TABLE>
Answered By
6 Likes
Related Questions
Raveena wants to insert an image on her web page and align it in the center. She has written the following code to center-align the image, but the desired result is not displayed. Can you tell her what is wrong with her code?
<IMG Src= "SAVETIGER.GIF" Align= "Center">
Shagun wants to set different background colours for the individual cells of the table. How can she achieve this?
Ayush has to display the sequence of events of the upcoming Annual Sports Day on the school website. Help Ayush in writing the HTML code to generate the following output.
Consider the web page given below and answer the following questions:
- Mention the tags used to create a table pointed by the letter A.
- Which property of
<IMG>
tag is used to wrap the text around the image? - Name the tag and its attributes to set the alignment of text pointed by the letters B and D.
- Name the tag used to create the links pointed by the letter C.