The earliest dinosaurs known are bipedal and this may well be the original posture of the entire group. In this pose, the hind legs are long and relatively slender giving a long-striding gait which can permit fast running. Since these animals are not heavily built, the legs can be light and delicate. More often than not the lower leg bones, notably those of the shin (the tibula and fibula) and the metatarsals which form the upper part of the foot to which the toes are attached are noticeably elongated, which improves the stride length at the expense of some overall strength. The feet are also narrow and the toes slender. The foot is also held in what is called a "digitigrade" (literally "toe-walking") position which means that the long bones of the foot (metatarsals) are held permanently clear of the ground and the animal walks only on its' toes. Such an arrangement increases the effective length of the leg and also saves energy because it means that the body does not have to be raised and lowered every time the foot is lifted.
This general type of body plan is seen in a range of carnivores, including all the theropods; as well as in herbivores, for it is also the standard ornithopod design.
Quadrupedal dinosaurs appear a little later in the fossil record than the bipedal dinosaurs, but are equally interesting and considerably more varied. Almost all quadrupedal dinosaurs are herbivores. This is accounted for by the fact that the stomachs of plant eaters need to be very large and, unless the body is specially modified as in ornithopods, this inevitably pitches the body forward onto its' forelimbs.
Apart from a few of the smaller types, nearly all quadrupedal dinosaurs have very stout pillar-like legs, which are designed to carry great weight, rather than to move the animal swiftly. As a result of this, the proportions of the bones of the leg tend to be the exact reserve of those of the biped. The thigh bone (femur) is the longest and is very straight, as it bends in the shaft it would tend to weaken it; the bones in the shin (tibula and fibula) are shorter than the femur; and the bones of the foot are very short, ending in a board set of stubby toes. The arrangement of the bones of the foot are remarkably similar to that of a living elephant and again in common with an elephant, the leg was probably kept more or less straight during a normal stride. The foot of the quadruped is interesting because of the shortness of the toes. Footprints of many of these quadrupeds, particularly those of the quadrupeds found in Denver USA - show that their feet left short, round footprints, very similar to those of the elephants. That proves beyond doubt that the foot of these creatures was designed around thick, fibrous wedge heel. Instead of having the long bones of the foot lying flat on the ground so that the heel has to be raised at each step, these bones are artifically raised off the ground by a heel pad.
The advantage of this heel is that it saves an enormous amount of energy which would otherwise have to be used to raise and lower the ankle (therefore lifting the entire body weight up and down!). The human foot is plantograde ("sole-walking"): the sole of the foot, extending back to the ankle is placed on the ground. Thus every step taken involves raising and lowering the ankle and as this happens so our whole body moves up and down, wasting muscular energy. We may be able to waste this energy, but a dinosaur weighing 20 tons or more cannot afford to be that extravagant.
It is not surprising to find that the structure of the front legs of quadrupeds is very similar to that at the back, except that - especially in animals with heavy tails such as dinosaurs - the front legs carry a smaller proportion of the total body weight and are therefore somewhat smaller in overall dimensions and strength.
To appreciate the way in which the backbone of a quadrupedal dinosaur such as Diplodcus works think of a suspension bridge. The front and back legs are the upright towers of the bridge and the backbone is the road way running between them. In an actual suspension bridge the deck is supported by cables slung between the towers. Similarly, the backbone of the dinosaur is supported by the ligaments and muscles of the back. Thus the backbone must be flexible, and its vertebrate are jointed together in a complicated manner to allow the neck, back and tail to bend slightly upwards at the ends. This helps to spread the weight towards the ends.
Using the example of an extremely long-necked,long-tailed and large sauropod is perhaps a little baised, but general construction principles apply to all quadrupedal dinosaurs. Smaller ones are naturally not under extreme pressure to economise on their use of bone No ornithischians developed long necks; if any thing they went the opposite way, tending towards shorter necks and tails, and larger, heavier heads.
For more Information click on the required topic: