How to create table cell using HTML5 ?
In this article, we will create cell in a table by using a combination of <tr> and <td> tag in a HTML table.
Syntax:
<table> <tr> <td> . . . </td> <td> . . . </td> </tr> </table>
Example:
<!DOCTYPE html> < html > < head > < title > How to create a cell in a table using HTML5? </ title > < style > body { text-align: center; } h1 { color: green; } table, tbody, td { border: 1px solid black; border-collapse: collapse; } </ style > </ head > < body > < center > < h1 >GeeksforGeeks</ h1 > < h2 > How to create a cell in a table using HTML5? </ h2 > < table > <!-- tr tag starts here --> < tr > < td >Geeks</ td > < td >For </ td > < td >Geeks</ td > </ tr > <!-- tr tag end here --> </ table > </ center > </ body > </ html > |
Output:
Supported Browsers are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Apple Safari
- Opera
Please Login to comment...