Put Non-Breaking Spaces in Empty HTML Table Cells

Put Non-Breaking Spaces in Empty HTML Table Cells

The tables that you design so carefully could end up looking odd in Internet Explorer or Netscape Navigator. The trouble is that browsers treat empty table cells differently. For instance, an empty cell may be rendered without borders, which can be visually distracting.To give an even appearance to all cells, including empty cells, insert the HTML code for a non-breaking space ( ). A regular blank space doesn’t work.You can see the effect of using   by viewing this code in your browser:

 Empty cells

A 2
B 2 5
C 6  

Browsing this code looks like:


See also  How to Avoid Money Transfer Scams  

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist