HTML base tag (Base URL Element)

preview_player
Показать описание
By using the 'base' tag in HTML, you are able to set the base URL for all the relative links in the document. It is defined in the 'head' tag.

In this video we look at how we can insert an image using the typical 'img' tag, but leaving out the relative directory in the 'src' attribute - instead we simply put the filename of the image. We then use the 'base' tag to insert the folder path of the image.

For your reference:

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
Рекомендации по теме
Комментарии
Автор

so it's not an important tag in the end, we can type images in the img tag

mohamadjeldeh
Автор

Nice video bro! Do you know if the base tag will be applied at "href" attributes?

sanguanelhidromeis
Автор

Thank you for the lesson and
Is it possible to use this in a json file ??

anisking