Search code examples
htmlenvironment

How to assign a specific domain to all my links on my page in HTML?


Hello I am making a static web page, and I need to put a specifig domain to all the links on my page, for example

Example:

From this

<a href="/courses.html">courses</a>

To something like this

<a href="http://www.bigschool.com/courses.html">courses</a>

Solution

  • Assume you are using pure HTML, you can try to manually enable the base tag by following sample code:

    <head>
        <base href="http://www.bigschool.com/" target="_blank">
    </head>
    

    Detail please read here.