Search DaTutorials:  
HOME
Html Tutorials
Basics
Forms
Frames
Hyperlinks and URLS
Images
Lists
Background
Colors
Fonts
Tables
Meta Tags
Events
Javascript Integration
Sound
Other
Search For a Tutorial
Html Reference

Empty cells

Description:


How to create empty cells in a table.

Code:

<html>
<body>


<h4>Empty cell without border</h4>
<table border="1">
<tr>
  <td>cell 1</td>
  <td></td>
</tr>
<tr>
  <td>cell 3</td>
  <td>cell 4</td>
</tr>
</table>


<h4>Empty cell with border</h4>
<table border="1">
<tr>
  <td>cell 1</td>
  <td> </td>
</tr>
<tr>
  <td>cell 3</td>
  <td>cell 4</td>
</tr>
</table>


</body>
</html>

Play with the code:

See working example:


Explanation:

Cell 2 is empty and it has no border. If you want to create a border in an empty cell, you can insert"&nbsp;" (white space) between the <td></td> tags.

See Also:

HTML: Html, Body, Table, Tr, Td


Online Html Forum  Discuss this tutorial in our HTML forum


     Loans | Car Credit | Loans | Credit Card Application | Home Business Opportunity
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp