EU law is divided into 'primary' and 'secondary' legislation. The treaties (primary legislation) are the basis or ground rules for all EU action.
Secondary legislation – which includes regulations, directives and decisions – are derived from the principles and objectives set out in the treaties.