网页模板Golang

I am working on a website with golang as my back end.

I would like to load webpages with a particular background image inside of a div depending on the full URL. I have gotten HTML templates to work well and I am able to dynamically change text and a few other things based on this.

However in HTML5, as you cannot define the background image of a div in anything but CSS, I would like to know how I might have this image change dynamically as well. I do not know how to dynamically change CSS with go(using net/http and html/template), or even if this is possible. Thank you