
Katharine B. answered 06/12/18
Tutor
4.9
(48)
Effective Tutor Specializing in Math and Science
With CSS, it is set up a bit differently from html in that the setup the design of the table (the 1px solid black border) in the <style> rather than the html method of having the command <table border="1">.
So in CSS, it'll look like this:
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {border: 1px solid black;}
</style>
</head>
<body>
<table>
<tr>
<th>Amount</th>
<th>Item</th>
</tr>
<tr>
<td>5</td>
<td>Carrots</td>
</tr>
<tr>
<td>200 ml</td>
<td>Orange Juice</td>
</tr>
<tr>
<td>350g</td>
<td>Sugar</td>
</tr>
<tr>
<td>1 teaspoon</td>
<td>Baking powder</td>
</tr>
</table>
</body>
</html>
<html>
<head>
<style>
table, th, td {border: 1px solid black;}
</style>
</head>
<body>
<table>
<tr>
<th>Amount</th>
<th>Item</th>
</tr>
<tr>
<td>5</td>
<td>Carrots</td>
</tr>
<tr>
<td>200 ml</td>
<td>Orange Juice</td>
</tr>
<tr>
<td>350g</td>
<td>Sugar</td>
</tr>
<tr>
<td>1 teaspoon</td>
<td>Baking powder</td>
</tr>
</table>
</body>
</html>