Code-Only: BASE tag changes in IE 7 with Examples

This is a quick helper reference showing the differences in the DOM trees after parsing HTML files with one or more BASE tags. We show the original HTML followed by the Pre IE 7 DOM Tree and finally the IE 7 DOM Tree. This can be used as reference to help fix up any pages that may be broken by the new compliant behavior.

Sample DOM Trees with a BASE tag in the HEAD element

Original HTML:
<HTML>
 <HEAD>
  <TITLE></TITLE>
  <BASE>
  <LINK>
 </HEAD>
 <BODY>
 </BODY>
</HTML>

Pre IE 7 DOM Tree:
<HTML>
 <HEAD>
  <TITLE></TITLE>
  <BASE>
   <LINK>
  </BASE>
 </HEAD>
 <BASE>
  <BODY>
  </BODY>
 </BASE>
</HTML>

IE 7 DOM Tree:
<HTML>
 <HEAD>
  <TITLE></TITLE>
  <BASE>
  <LINK>
 </HEAD>
 <BODY>
 </BODY>
</HTML>

Sample DOM Trees with a BASE tags in the BODY element

Original HTML:
<HTML>
 <BODY>
  <BASE>
  <IMG>
  <BASE>
  <IMG>
 </BODY>
</HTML>

Pre IE 7 DOM Tree:
<HTML>
 <BODY>
  <BASE>
   <IMG>
   <BASE>
    <IMG>
   </BASE>
  </BASE>
 </BODY>
</HTML>

IE 7 DOM Tree:
<HTML>
 <BODY>
  <BASE> <!-- Ignored -->
  <IMG>
  <BASE> <!-- Ignored -->
  <IMG>
 </BODY>
</HTML>

Sample DOM Trees with a BASE tag and TITLE in an implied HEAD

Original HTML:
 <TITLE></TITLE>
 <BASE>
 <IMG>

Pre IE 7 DOM Tree:
<HTML>
 <HEAD>
  <TITLE></TITLE>
  <BASE></BASE>
 </HEAD>
 <BASE>
  <BODY>
   <IMG>
  </BODY>
 </BASE>
</HTML>

IE 7 DOM Tree:
<HTML>
 <HEAD>
  <TITLE></TITLE>
  <BASE>
 </HEAD>
 <BODY>
  <IMG>
 </BODY>
</HTML>

Published Saturday, August 27, 2005 6:22 PM by Justin Rogers
Filed under:

Comments

Friday, June 29, 2007 9:00 AM by Mutiny Design

# re: Code-Only: BASE tag changes in IE 7 with Examples

Interesting. Surprised to see that someone  else takes note of the base tag.

Saturday, June 21, 2008 3:00 PM by info@getoninter.net

# re: Code-Only: BASE tag changes in IE 7 with Examples

thanks for this code!

Tuesday, July 29, 2008 11:19 AM by FMN Media

# re: Code-Only: BASE tag changes in IE 7 with Examples

Interesting, thanks

Tuesday, August 5, 2008 3:10 AM by Creativ Era's

# re: Code-Only: BASE tag changes in IE 7 with Examples

This is a great recourse. Interesting fact about the base tag.

Thanks for sharing it.

Monday, October 4, 2010 8:07 PM by cheapwebdesign

# re: Code-Only: BASE tag changes in IE 7 with Examples

Very nice, thanks for sharing :)

Monday, November 1, 2010 11:43 AM by اليوتيوب

# re: Code-Only: BASE tag changes in IE 7 with Examples

well done this is the main required codes

Wednesday, March 23, 2011 12:40 AM by hydrogen generator car

# re: Code-Only: BASE tag changes in IE 7 with Examples

Searching for this for some time now - i guess luck is more advanced than search engines

Thursday, July 7, 2011 7:24 PM by Stefan Gedman

# re: Code-Only: BASE tag changes in IE 7 with Examples

With havin so considerably content and articles do you ever run into any problems of plagorism or copyright violation? My weblog has many exclusive content I've either written myself or outsourced however it appears a great deal of it's popping it up all over the world wide web without my agreement. Do you know any techniques to help avoid content from becoming stolen? I'd definitely appreciate it.

Friday, December 14, 2012 3:59 AM by http://www.kent-website-designer.co.uk/

# re: Code-Only: BASE tag changes in IE 7 with Examples

Bit out of date now but part of a very useful reference coding reference for creating relative links in templating languages.

Tuesday, January 8, 2013 6:43 PM by Mccoy

# re: Code-Only: BASE tag changes in IE 7 with Examples

There have been really several particulars just like that to take into consideration.

That could be a nice level to convey up. I provide that the ideas above

because normal inspiration but clearly there are questions

for instance that the one you deliver up where a very powerful thing shall be working in sincere first-class

faith. I don?t identify if best practices have emerged around issues for example that, conversely I am positive that your job

is clearly recognized because a excellent game. Both girls and boys really feel that the

impact of simply a second’s pleasure, for that the remainder of their lives.

Tuesday, January 8, 2013 7:26 PM by Barbour

# re: Code-Only: BASE tag changes in IE 7 with Examples

It seems you are getting quite a lof of unwanted comments.

Maybe you should look into a solution for the. …

Saturday, January 12, 2013 2:50 AM by Jewett

# re: Code-Only: BASE tag changes in IE 7 with Examples

Thanks a lot for giving everyone an extraordinarily brilliant chance to read articles and blog posts from this blog.

Tuesday, January 29, 2013 9:53 PM by Burleson

# re: Code-Only: BASE tag changes in IE 7 with Examples

Thanks a ton for your efforts to have had these things together on this blog site.

Mary and i also very much appreciated your input

through your articles with certain things. I know someone to have plenty of demands in your schedule hence the fact someone to really

took that the maximum amount of time because you did to guide people

really just like us via this article is actually highly valued.