Base URL in HTML

The section contains stuff related to the HTML/DHTML/XHTML for Web Page Development.

Base URL in HTML

Postby php developer on August 4th, 2008, 3:47 am

If you need to represent your relative links, paths as an absolute links & paths, then just use a base tag in your meta tags and all your links/paths will be treated as absolute paths.

example:
Code: Select all
<html>
  <head>
    <title>Base URL example</title>
    <base href="http://www.GeoSourceCode.com" />
  </head>

  <body>
    <a href="http://www.GeoSourceCode.com/page1.html">Page 1 Link</a>
   <br><br><br>
   <a href="page2.html">Page 2 Link</a>
   <br><br><br>
   Both are treated as absolute links.
  </body>
</html>
php developer
 
Posts: 18
Joined: July 25th, 2008, 4:56 am

Return to HTML / DHTML / XHTML

Who is online

Users browsing this forum: No registered users and 0 guests