Reputation: 1
Okay so here's the question: in HTML is it possible to, using the link
tag in the head
, set a default folder location? For example, say I break up my files on my server by page and have one called baseball and in the baseball folder I've got one called images. Baseball is a page in this example, and all the images I'm using for that page are coming form \baseball\images
so in this example I want to do this
link href = "\baseball\images\"
so later on when I need to pull an image from that folder all I have to type is:
img src = "Pitcher.jpg"
instead of
img src = "\baseball\images\Pitcher.jpg"
Is there a way to do that, maybe not with link
, but let's say a
is done in the head
part of the document?
Upvotes: 0
Views: 28
Reputation: 20199
Use <base>
tag
eg: <base href="\baseball\images**" target="_blank">
The HTML element specifies the base URL to use for all relative URLs contained within a document.There is maximum one
<base>
element in a document.
Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
Upvotes: 1