Custom html block header and body

I’ve been through the examples shown in the documentation for the Custom HTML block a few times now.
I get how the query portion works.
But it’s not clear to me how the code shown in the custom body content relates to the script sources in the Head Content section.


Please see my answer here: Custom HTML block Gauge