February 25th, 2014, 02:24 AM
The base tag
I have the below code,
So the link is:
<p>Visit the <a href="archives.html">archives</a>.</p>
When add http in base tag
the problem is solve and link is:
February 25th, 2014, 05:00 AM
Because "www.google.com" by itself is just a name like "archives.html". You need the //s at the very least for the browser to know that it's supposed to be a domain.
February 27th, 2014, 07:55 AM
Thank you for your reply,
But i don't understand it
February 27th, 2014, 08:40 AM
Yeah, that's the problem of modern browsers: They hide all the technical details, and in the end, people forget how an URL actually looks like.
An absolute URL consists of a scheme, a domain and a path. A scheme is something like "http" or "https" and specifies the protocol to use. The domain in your case would be "google.com". And the path is "/".
So the full URL is
If you leave out the scheme, you get a relative URL which points to a resource on the current site. So
This is of course total nonsense.
So you must specify the scheme. You can either explicitly write it down like above or use a scheme-relative URL as explained by requinix.