Which is correct code to display border in table in web page?
a) <table tableborder=7>
b) <table>Border=7
c) <table border=7>
d) None of the above
Answers
Answer:
I think I helped you so that's why I like
Explanation:
HTML | <table> border Attribute
The HTML <table> border Attribute is used to specify the border of a table. It sets the border around the table cells.
Syntax:
<table border="1|0">
Attribute Values:
1: It sets the border around the table cells.
0: It removes (not set) the border around the table cells.
Example:
<!DOCTYPE html>
<html>
<head>
<title>
HTML table border Attribute
</title>
</head>
<body>
<h1>GeeksforGeeks</h1>
<h2>HTML table border Attribute</h2>
<table border="1">
<caption>Author Details</caption>
<tr>
<th>NAME</th>
<th>AGE</th>
<th>BRANCH</th>
</tr>
<tr>
<td>BITTU</td>
<td>22</td>
<td>CSE</td>
</tr>
<tr>
<td>RAM</td>
<td>21</td>
<td>ECE</td>
</tr>
</table>
</body>
</html>
Output:
Supported Browsers: The browser supported by HTML <table> border Attribute are listed below:
Google Chrome
Internet Explorer
Firefox
Safari
Opera