Question: How can you select the first and the last `TD` in a row?

```
tr > td[0],
tr > td[-1] {
/* styles */
}

```

Answer: 
You can use the following snippet:

```
  tr td:first-child {text-decoration: underline;}
  tr td:last-child {color: red;}

```

Using the following pseudo classes:

**:first-child** means "select this element if it is the *first child* of its parent". 

**:last-child** means "select this element if it is the *last child* of its parent". 

Only element nodes (HTML tags) are affected, these pseudo-classes ignore text nodes.
You can use

table tr td:first-child { css here
}
**for First Child and**

table tr td:last-child { css here
}
**for last Child**.