For an easy-to-build fence on a flat yard, DIY'ers might consider using pre-assembled panels that install between posts. The panels are a system of rails and pre-attached fence boards. However, if your yard is sloped, then to keep the panel tops level you’ll have to stagger the panel heights where they fasten to the posts. If the yard has a significant grade, the staggered panels will create gaps at the bottom of the fence, through which a family dog can escape (and unwanted critters can enter).
One alternative is to keep each set of fence boards in a straight line between two posts. To do this, attach a string line at the tops of the corresponding posts and use it as an installation guide for the height of the fence boards. Or, use a temporary 2x4 beneath the boards, resting the lower ends on it as you fasten them in place. Removing the 2x4 then provides a gap at the bottom of the fence to keep the wood out of standing water.
Another option is a privacy fence built to closely follow the grade of the yard, adjusting each individually for height as you install it. If doing this, it's still a good idea to install the boards an inch or two above the ground to avoid water leeching into the end grain.
FENCE BOARD ALIGNMENT