Creating tables using HTML5's
.div-table { display: table; width: auto; background-color: #eee; border: 1px solid #666666; border-spacing: 5px; /* cellspacing: poor IE support for this */ } .div-table-row { display: table-row; width: auto; clear: both; } .div-table-col { float: left; /* fix for buggy browsers */ display: table-column; width: 200px; background-color: #ccc; }
<body> <form>
This code snippet will create a table with the specified headers and data, displaying it properly in browsers like Internet Explorer 7 and above. By utilizing
The above is the detailed content of How Can I Create a Table Using Only `` and CSS?. For more information, please follow other related articles on the PHP Chinese website!