A Base tag provides a default (base) URL or relative links. It is usually used to set a default URL for all subsequent relative links. Relative links can be a stylesheet, source of script tag and hrefs in anchor tag. In simple terms you can say a base tag sets a default address or a default target for all links on a page.
One important thing that you should always remember is that a base tag must be within the head tag and it must be the first tag in the head tag. You can use only one base tag in a document and you must use the href attribute, target attribute or both.
Standard Syntax<basehref="URL"target="frame or window name | _blank | _parent | _self |_top">Examples<!-- standard HTML syntax ---><base href="http:// www.c-sharpcorner.com/"><!-- with frames --><base target="_blank" href="http:// www.c-sharpcorner.com/">
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: