The href attribute can be a relative1 path:
<a href="/path/to/page">Blah</a>
The link would grab the current protocol, host, and port and append whatever comes next.
Sample scenario: let's pretend the current URL is http://yoursite.com/pages/links.html the above example anchor would navigate when clicked to http://yoursite.com/path/to/page.
NOTE: If you omit the leading slash in the relative path
<a href="path/to/page">Blah</a>
The current full path will be used.
Sample scenario: let's pretende the current URL is http://yoursite.com/pages/links.html then the anchor without leading slash would navigate when clicked to http://yoursite.com/pages/path/to/page
1: relative as in relative to the current page
<a href="/usr/page.aspx?pgid=1">www.example.com</a>? Will be interpreted by browser with current hostname, protocol, port.<a href="/usr/page.aspx?pgid=1">www.example.com</a>, when a user visits a page served by site1.com, the link will point tohttp|https://site1.com//usr/page.aspx?pgid=1