Articles → HTML → Base Tag In HTML

Base Tag In HTML






Purpose Of Base Tag





Example




<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title>Untitled Page</title>
</head>

<body>
	<img src="ArticleImages/introduction_to_windows_forms_using_visual_studio_one.jpg" />
</body>

</html>

Try It



Picture showing the web page when base tag is not defined





Base Tag




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<base href="http://www.gyansangrah.com/" />
	<title>Untitled Page</title>
</head>

<body>
	<img src="ArticleImages/introduction_to_windows_forms_using_visual_studio_one.jpg" />
</body>

</html>

Try It



Picture showing the web page when base tag is defined



Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, September 2, 2015
 
Updated On  -  Saturday, April 1, 2017

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250