我们可以轻松地在表格中添加 html 标签。 html 标签应放置在 b6c5a531a458a2e790c1fd6421739d1c 标签内。例如,在 b6c5a531a458a2e790c1fd6421739d1c 标签内添加段落 e388a4556c0f65e1904146cc1a846bee…94b3e26ee717c64999d7867364b1b4a3 标签或其他可用标签。
语法以下是在 html 表格中使用 html 标记的语法。
<td> <p> paragraph of the context</p><td>
示例 1下面给出了在 html 表格中使用 html 标签的示例。
<!doctype html><html><head> <meta charset=utf-8> <meta http-equiv=x-ua-compatible content=ie=edge> <meta name=viewport content=width=device-width, initial-scale=1.0> <style> table,tr,th,td { border:1px solid black; } </style></head><body> <table style=width: 50%> <caption style=text-align: center; >employees</caption> <tr> <th >employeename</th> <th >about employee</th> </tr> <tr> <td >yadav</td> <td ><p>lokesh yadav is a content developer at tutorialspoint.</p></td> </tr> <tr> <td>abdul</td> <td ><p>abdul is a content developer at tutorialspoint.</p></td> </tr> </table></body></html>
以下是上述示例程序的输出。
我们还可以在 html 表格中添加其他 html 标签。
示例 2以下是在 html 表格中使用 html 标记的语法。
<!doctype html><html><head> <meta charset=utf-8> <meta http-equiv=x-ua-compatible content=ie=edge> <meta name=viewport content=width=device-width, initial-scale=1.0> <style> table,tr,th,td { border:1px solid black; } </style></head><body> <table style=width: 50%> <caption style=text-align: center; >employees</caption> <tr> <th>employeename</th> <th>languages known</th> </tr> <tr> <td>yadav</td> <td><ul> <li>html</li> <li>java</li> <li>c</li> </ul></td> </tr> <tr> <td>abdul</td> <td ><ul> <li>c#</li> <li>java</li> <li>c</li> </ul></td> </tr> </table></body></html>
以下是上述示例程序的输出。
示例 3在 html 表格中使用 html 标签的另一个示例如下 -
<!doctype html><html><head> <style> table, th, td { border: 1px solid black; width: 400px; } </style></head><body> <h1> total points</h1> <table> <tr> <th>technologies</th> <th>points</th> </tr> <tr> <td>programming languages <ul> <li>c++</li> <li>java</li> <li>c</li> </ul> </td> <td>100</td> </tr> <tr> <td>database <ul> <li>mysql</li> <li>oracle</li> <li>couchdb</li> </ul> </td> <td>50</td> </tr> </table></body></html>
以上就是如何在html表格中使用html标签?的详细内容。