Change the alignment

Report a typo

In the below HTML code, force the alignment of the <th> element to the left using the correct CSS property.

Write HTML and CSS code
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Alignment</title>
</head>
<body>
<table>
<thead>
<tr>
<th>First name</th>
<th>Last name</th>
<th>Age</th>
</tr>
</thead>

<tbody>
<tr>
<td>Mark</td>
<td>Peterson</td>
<td>20</td>
</tr>

<tr>
<td>Henry</td>
<td>Joseph</td>
<td>23</td>
</tr>

<tr>
<td>Kaira</td>
<td>Paul</td>
<td>32</td>
Completed 1 of 2
Left align the th elements in the table
The code is valid
___

Create a free account to access the full topic