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.
If you use sass(scss) you can use the following snippet:

```
tr > td{
   /* styles for all td*/
   &:first-child{
     /* styles for first */ 
   }
   &:last-child{
    /* styles for last*/
   }
 }

```