I have HTML pages with relative paths, for example this example below will use the base and relative path if base = www.test.com/img/testHtmlPage.html
<a href="/img/testHtmlPage.html">
I want to know is there any way in html to take as variable the root or the base(in my case test.com as variable) and use it in another link like this
<a href="www.anotherLink.test.com/img/testHtmlPage.html">
In my case I have another link but it use same root.
P.S. I'm sorry if the question is made up incorrectly, I try my best.