Computer Applications
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>
HTML Advanced Features
1 Like
Answer
Output
Answered By
2 Likes
Related Questions
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>
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>
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>
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.