Home >Web Front-end >HTML Tutorial >How to set the distance between table cells and table borders_html/css_WEB-ITnose
cellspacing sets a spacing on all sides of the cells in all tables, and now requires the margins between the cells on the sides and the table to be 0.
Add border='1' style='border-collapse:collapse;' cellspacing='0' bordercolor='black' to the Table tag
Add border='1' to the Table tag style='border-collapse:collapse;' cellspacing='0' bordercolor='black'
border-collapse:collapse; only merges double borders, and will invalidate cellspacing.
It can’t be achieved with a table. You can implement it by inserting a div in the td of the table
I just want to see if there is a simple and direct method. The DIV can be adjusted by yourself. Different positions require different styles.