I have been coding in HTML for years, but I am a bit of a Wordpress virgin. After failing to find an answer to my problem I submit it below.
In order to extend a Wordpress page quickly I pasted raw HTML into it. The result wasn't too bad EXCEPT for the enormous number of newlines
which appear in the final product and completely mess up the formatting.
Even quite short section headings now appear on two lines.
Any advice on how to avoid this happening when pasting large amounts of HTML would be greatly appreciated.