When you post a code snippet you can should use the </> button.
First select the code piece and then press the button to format the selected code.
Or you can first press the code button and then paste the code to replace the “type or paste code here” message.
The </> was done by using the code button to get “preformatted text” in a text line.
I will borrow @Erik_J’s example and change the selector to show two more methods of addressing a row of cells and a way of including the space between the cells, if desired.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>table row color</title>
<style>
.rowcolor td { /* delete this "td" to color the space between the cells, too. */
background-color: pink;
}
</style>
</head>
<body>
<table>
<tbody>
<tr class="rowcolor"> <!-- move the classname to this "tr" -->
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
</tbody>
</table>
</body>
</html>
Please note that there are very, very few properties that can target a <tr>, but fortunately background-color is one of them.