The XHTML WYSIWYG Editor For Desktop & Web Applications



To resolve relative URLs, Web browsers will use the base URL from where the Web page was downloaded. In some circumstances, it is necessary to instruct the Web browser to use a different base URL, in which case the base element is used.


In the following example, regardless of where the Web page was downloaded from, the CSS file will be downloaded from and the image will be downloaded from

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
  2. <html xmlns="">
  3. <head>
  4. <base href="" />
  5. <style type="text/css">@import url('screen.css');</style>
  6. </head>
  7. <body>
  8. <h1><img src="images/logo.gif" alt="XStandard" /></h1>
  9. </body>
  10. </html>

Best practice

If the base element is to be used, it should be defined before any relative URL is used.



(URI) Specifies an absolute URL that acts as the base URL for resolving relative URLs. This attribute is required.


  • Nothing