A code is a collection of laws and rules that assists a government agency in meeting its obligation to protect the general welfare by preventing damage to property or injury or loss of life to persons. A standard is a generally agreed-upon set of procedures, criteria, dimensions, materials, or parts. Engineering standards may describe the dimensions and sizes of small parts like screws and bearings, the minimum properties of materials, or an agreed-upon procedure to measure a property like fracture toughness.
The terms standards and specifications are sometimes used interchangeably. The distinction is that standards refer to generalized situations, while specifications refer to specialized situations. Codes tell the engineer what to do and when and under what circumstances to do it. Codes usually are legal requirements, as in the building code or the fi re code. Standards tell the engineer how to do it and are usually regarded as recommendations that do not have the force of law. Codes often incorporate national standards into them by reference, and in this way standards become legally enforceable