O atributo CELLSPACING define a distância entre as células e linhas, sendo aplicavél a tag
<TABLE>. Os valores informados neste atributo são em pixels.
Modelo de uso do atributo CELLSPACING
<html>
<head>
<title>Tabelas</title>
</head>
<body>
<h1>Atributo CELLSPACING</h1><BR>
<table width="300" border="2" align="center" cellspacing="0">
<tr>
<td align="center" height="30">1</td>
<td align="center" >2</td>
<td align="center" >3</td>
</tr>
</table>
</body>
</html>
CELLPADDING
O atributo CELLPADDING defne a distância ente o conteúdo da célula em relação as suas
bordas, sendo aplicavél na tag <TABLE>. Os valores informados neste atributo são em pixels.
Modelo de uso do atributo CELLPADDING
<html>
<head>
<title>Tabelas</title>
</head>
<body>
<h1>Atributo CELLPADDING</h1><BR>
<table width="300" border="2" align="center" cellspacing="0" cellpadding="10">
<tr>
<td align="center" >1</td>
<td align="center" >2</td>
<td align="center" >3</td>
</tr>
</table>
</body>
</html>
COLSPAN
O atributo COLSPAN é aplicado nas tags <TH> e <TD>, pois define quantas colunas uma
célula pode abranger. Por padrão, na maioria dos navegadores cada célula corresponde a uma coluna na
tabela.
<html>
<head>
<title>Tabelas</title>
</head>
<body>
<h1>Atributo COLSPAN</h1><BR>
<table width="300" border="2" align="center" cellspacing="2" cellpadding="2">
<tr>
<td align="center" colspan="2">1</td>
<td align="center">2</td>
</tr>
<tr>
<td align="center" >3</td>
<td align="center" >4</td>
<td align="center" >5</td>
</tr>
</table>
</body>
</html>
0 comentários:
Postar um comentário