If I bought some shares using a loan (leaving aside the gearing risks) would I be able to offset the interest against my income or the dividend income from the sahres?
In simple terms you can have loan interest as a deduction if it is for business purposes. So you can't deduct loan interest from earned income or dividend income.
Sorry, missed a few words. So you can't deduct loan interest incurred for the acquisition of shares as a personal investment from earned income or dividend income.