HTML can add borders by adding the border attribute to the table. Recommended learning: html tutorial
Example:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> </head> <body> <table width="400" border="1" cellspacing="0" cellpadding="0"> <tr> <td >示例</td> <td >网址</td> <td >示例</td> </tr> <tr> <td>示例</td> <td>示例</td> <td>示例</td> </tr> <tr> <td>示例</td> <td>示例</td> <td>示例</td> </tr> </table> </body> </html>
Rendering:
border abbreviation attribute Set all border properties in one statement.
You can set the following properties in order:
border-width: Specifies the width of the border.
border-style: Specifies the style of the border.
border-color: Specifies the color of the border.
The above is the detailed content of html table border. For more information, please follow other related articles on the PHP Chinese website!