base tag

It is used to give a base path for all the links. So that browser will add given relative path to this base path and will make an absolute URL. It specifies a default URL and a default target for all links on a page

It is used inside the head element and has no end tag.

The href attribute of the base tag is used to give the URL for example

<base href=”http://www.vskills.in /” />

Hence, a relative URL like

Media/Picture1.gif

after conversion to absolute URL by the browser will be

http://www.vskills.in/Media/Picture1.gif

Apply for HTML Certification

https://www.vskills.in/certification/certified-html-designer

Back to Tutorials

Relative URL
Source anchor

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?