Spread the love
To add a relative URL to a different port number in a hyperlink with HTML, you can simply specify the port number along with the relative path in the href
attribute of the tag.
To do this, we write:
Link to Different Port
In this example,
http://example.com:8080
is the base URL with the different port number (8080)./relative/path
is the relative path that you want to navigate to within the specified port.Replace
example.com
with your actual domain name and 8080
with the desired port number.The relative URL
/relative/path
can be replaced with your specific relative path as needed.This hyperlink will navigate to the specified relative path on the specified port when clicked.