The formation of either of the compounds secreted by the thyroid gland, mainly thyroxine and triiodothyronine. This is achieved by the iodination and joining of tyrosine molecules to form the precursor thyroglobin, proteolysis of this precursor gives rise to the thyroid hormones.