Reserved ID Values in IE/Win

Have you come across printing error as shown in the screenshot below when trying to print a web page in IE/Win? I did! To view this error, please view this page in IE/Win and then click here and print.

Printing Error in IE/Win

I had no clue what’s causing it. So, I googled and found out the usual cause for this issue is using one of the ID values reserved by IE/Win as explained here.

The code causing the problem is as can be viewed here:
<h1 id=”tags”>This is a Test</ h1>

To resolve the issue, I had to change the word “tags” as can be viewed here:
<h1 id=”test”>This is a Test</ h1>

“tags” (in lower case and when used as ID value only) seems to be a reserved ID value in IE/Win and hence causes printing error.

There are few other reserved ID values that causes some sort of problems in IE/Win. I got this list from Meyerweb.com (Please note that I have tested only ID value “tags”):

  • length
  • item
  • namedItem
  • tags
  • urns
  • all

So, if you are facing some weird issues in IE/Win, I suggest making sure that you are not using one of the reserved ID values in the HTML. Hope it helps!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.