search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

Supplementary knowledge of table properties in CSS basic tutorial

CSS table properties

In the previous HTML table tutorial, we mentioned that the rules attribute of the table has poor compatibility. Here we introduce a new attribute to replace it.

border-collapse: Table border lines are merged, value: collapse.

<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>php.cn</title>
    <style type="text/css">
   table,tr,td{
       width:200px;
       border:1px solid;
       border-collapse:collapse;
   }
    </style>
    </head>
    <body>
        <table >
            <tr>
                <td>&nbsp</td>
                <td>&nbsp</td>
                <td>&nbsp</td>
                <td>&nbsp</td>
            </tr>
        </table>
    </body>
</html>


new file
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <style type="text/css"> table,tr,td{ width:200px; border:1px solid; border-collapse:collapse; } </style> </head> <body> <table > <tr> <td>&nbsp</td> <td>&nbsp</td> <td>&nbsp</td> <td>&nbsp</td> </tr> </table> </body> </html>
Reset Code
Automatic operation
submit
Preview Clear