To apply a border to an element in CSS, you can use the `border` property. The `border` property is a shorthand property for setting the individual border properties in a single place:
```
selector {
border: width style color;
}
```
Below are the individual properties:
- `width`: The thickness of the border (ex: 2px, 1em, etc.).
- `style`: The style of the border (ex: solid, dotted, dashed, double, groove, ridge, inset, outset, none, hidden).
- `color`: The color of the border (color name, hex, rgb, rgba, hsl, etc.).
Here is an example:
```
div {
border: 2px solid black;
}
```
In this example, it is applied a border to `
Remember that if you want to apply the border to a specific side of your element, rather than all around it, you can use the `border-top`, `border-right`, `border-bottom`, or `border-left` properties, and follow the same format.