How to create table cell using HTML5 ?
Last Updated :
14 Jul, 2020
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 >
< td >Geeks</ td >
< td >For </ td >
< td >Geeks</ td >
</ tr >
</ table >
</ center >
</ body >
</ html >
|
Output:
Supported Browsers are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Apple Safari
- Opera
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...