要使用HTML创建带标题的表,请使用<caption>标记。在<table>标记后立即在表内添加标题。
您可以尝试运行以下代码以在HTML中创建带有标题的表
<!DOCTYPE html> <html> <head> <style> table, td, th { border: 1px solid black; } </style> </head> <body> <table> <caption>Our Technologies</caption> <tr> <th>IDE</th> <th>Database</th> </tr> <tr> <td>NetBeans IDE</td> <td>MySQL</td> </tr> </table> </body> </html>