Though there are some differences between attached decks and freestanding decks, for the most part the following elements remain the same.
Building codes determine the exact size and spacing.
Footings are cast in place in undisturbed soil. In some areas you may need to add gravel for drainage. These attach to the footings and provide support for the posts. If you cast your own blocks, attach post anchors to them. These are generally made from 4x4s.