Simple Web page heading issues

I have taken the simple websocket website from the Node Red Cookbook and tried to adapt it for my purposes. In my attempt to get an inject node to appear under two seperate headings, my lack of javascript and HTML knowledge has caused me to hit a cul-de-sac. At present I do not know how the message payload from one inject node can be assigned to a corresponding heading through the coding and I need help please?

The nodes are;


The Simple Webpage code is;

The 1 second inject is;


The 5 second inject is;


Any assistance would be gratefully received.

You do know that uibuilder will do all of that for you don't you?

Thanks Julian,

I shall have a look and come back if needed.