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> |