MyTetra Share
Делитесь знаниями!
- базирование ссылок страниц
Время создания: 01.10.2017 11:05
Раздел: HTML
Запись: xintrea/mytetra_db_mcold/master/base/1506845115sly1ulmd5z/text.html на

The HTML <base> Tag

The HTML <base> tag is used for specifying the base URL for all relative URLs in a page, which means all the other URLs will be concatenated into base URL while locating for the given item.

For example, all the given pages and images will be searched after prefixing the given URLs with base URL directory −

<!DOCTYPE html>

      <title>HTML Base Tag Example</title>
      <base href = "" />

      <img src = "/images/logo.png" alt = "Logo Image"/>
      <a href = "/html/index.htm" title = "HTML Tutorial"/>HTML Tutorial</a> 


This will produce the following result −

But if you change base URL to something else, for example, if base URL is then image and other given links will become like and

Так же в этом разделе: