OK that is certainly quite long and convoluted.
HTML syntax
I have convinced myself with this little function that [some of] your HTML syntax works. The text field does change to a green bullseye icon:
msg.payload = "<font color='springgreen'> <i class='fa fa-bullseye fa-2x' ></i></font>"
return msg;
Syntax error
There is at least one error in your HTML code though:
// ============== Internet IP
let icon1 = '<font color = "green"> <i class="fa fa-bullseye fa-2x" ></i></font>'
let icon2 = '<font color = "green"> <I class="material-icons"><span> wifi </span>'
I don't think the capital <I ...
for icon2 is a problem, but you don't have a closing </i>
tag.
I think it should be
let icon2 = '<font color = "green"> <I class="material-icons"><span> wifi </span></i>'
msg.colour
And unless I misunderstand, appending msg.colour to your output messages serves no purpose. I think you could omit colour: "green"
in many lines.
msg1 = { payload: '<font color = "green"> <i class="fa fa-bullseye fa-2x" ></i></font>', colour: "green" };
An alternative approach
If I was writing this, I would try to minimise HTML errors by having as few lines as possible that compose HTML. Something like in this (greatly simplified) example. But that would be a complete rewrite.
[{"id":"135845945e04e7b7","type":"inject","z":"93cb71efa2c3321f","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":210,"y":260,"wires":[["c5aaf4a0153df8ef"]]},{"id":"c5aaf4a0153df8ef","type":"function","z":"93cb71efa2c3321f","name":"function 66","func":"let msg1 = {}\nlet msg2 = {}\nlet colour1\nlet icon1\nlet text1\nlet colour2\nlet icon2\nlet text2\n\n// complicated processing here that sets colour1, icon1, text1 etc\ncolour1 = \"red\"\nif (msg.payload === true) {\n icon1 = \"fa-wifi\"\n text1 = \"\"\n}\nelse {\n colour1 = \"green\"\n icon1 = \"fa-bullseye\"\n text1 = \"Some text\"\n}\n// More complicated code to set colour2, icon2 and text 2\ncolour2 = \"blue\"\nicon2 = \"fa-envelope-open\"\ntext2 = \"\"\n\nmsg1.payload = '<font color = \"' + colour1 + '\"> <i class=\"fa ' + icon1 + ' fa-2x\" ><span> ' + text1 + ' </span></i></font>'\nmsg2.payload = '<font color = \"' + colour2 + '\"> <i class=\"fa ' + icon2 + ' fa-2x\" ><span> ' + text2 + ' </span></i></font>'\nreturn [msg1, msg2]","outputs":2,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":280,"wires":[["6807ad8f039c5af5","c7fa5c1a5f483de1"],["1f59e1001a14fc0d","5fdb29cefebeb2d2"]]},{"id":"ba649785d332c83c","type":"inject","z":"93cb71efa2c3321f","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":210,"y":300,"wires":[["c5aaf4a0153df8ef"]]},{"id":"6807ad8f039c5af5","type":"ui_text","z":"93cb71efa2c3321f","group":"5b5ee9f169c93ecf","order":0,"width":0,"height":0,"name":"","label":"test1","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#0000ff","x":570,"y":260,"wires":[]},{"id":"1f59e1001a14fc0d","type":"ui_text","z":"93cb71efa2c3321f","group":"5b5ee9f169c93ecf","order":0,"width":0,"height":0,"name":"","label":"test2","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#0000ff","x":570,"y":300,"wires":[]},{"id":"5fdb29cefebeb2d2","type":"debug","z":"93cb71efa2c3321f","name":"debug2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":580,"y":340,"wires":[]},{"id":"c7fa5c1a5f483de1","type":"debug","z":"93cb71efa2c3321f","name":"debug1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":580,"y":220,"wires":[]},{"id":"5b5ee9f169c93ecf","type":"ui_group","name":"demo","tab":"195948bb680041dd","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"195948bb680041dd","type":"ui_tab","name":"Demo","icon":"dashboard","disabled":false,"hidden":false}]