Skip to: site navigation/presentation
Skip to: Thoughts From Eric

When Printing Kills

Here’s a fascinating little tidbit: on some users’ machines, attempts to print out Joe Clark‘s ALA article “Facts and Opinions About PDF Accessibility” would crash Internet Explorer.  The error message mentioned a script error in line 1401: “Object doesn’t support this property or method”.  Funny thing: we weren’t doing any scripting.  The error was actually occurring shdoclc.dll/preview.dlg, which is of course a piece of the operating system.

Jason did some sleuthing and traced the crash to this line of markup:

<h2 id="tags">Tags and structure</h2>

Honestly, that was it.  So Jeffrey renamed the ID to read:

<h2 id="structure">Tags and structure</h2>

So far as we know, no more crashing in Explorer.

Ain’t browsers a slice?

(And yes, we’re aware of the clamor for a print style sheet.  More on this later.)

Update: Marten Veldthuis from Strongpsace points out that 37signals ran into a very similar problem in Backpack.  Details can be found in Jamis Buck‘s June 3rd post ie-is-teh-3v1lSpread the word: “tags” is effectively a reserved keyword, even though no such concept exists in (X)HTML.  Use it at your (users’) peril.

46 Responses»

    • #1
    • Comment
    • Fri 26 Aug 2005
    • 2232
    Marten Veldthuis wrote in to say...

    Wow, more problems with id=”tags”? 37Signals also had problems with it in Backpack, Jamis blogged it up a little while ago.

    • #2
    • Pingback
    • Sat 27 Aug 2005
    • 0201
    Received from miriland » Blog Archive » When Printing Kills…

    […] rinting Kills…”>

    Having trouble printing a web page in IE? Perhaps might be the reason why. Talk about random.

    This […]

    • #3
    • Comment
    • Sat 27 Aug 2005
    • 0308
    somuee wrote in to say...

    ahhh… but did you spin clockwise or counterclockwise 3 times before you clucked like a chicken, hopped up and down on one leg and started typing?

    • #4
    • Trackback
    • Sat 27 Aug 2005
    • 0856
    Received from Geoffers'

    Death by ID

    Why Joe Clark’s ALA article “Facts and Opinions About PDF Accessibility” wouldn’t print in IE

    • #5
    • Pingback
    • Sat 27 Aug 2005
    • 0857
    Received from Geoffers’ » Death by ID

    […] Web Stuff – Saturday, August 27th 2005 As Eric Meyer posted this a couple of hours ago, and I find this funny, I’m going to post this […]

    • #6
    • Comment
    • Sat 27 Aug 2005
    • 1527
    Chris Hester wrote in to say...

    Is this related to Microsoft’s abandoned plan to include Smart Tags based on the words in a web page?

    • #7
    • Comment
    • Sat 27 Aug 2005
    • 1627
    Julian wrote in to say...

    Hey, good tip, I think I have to change a site of mine

    • #8
    • Trackback
    • Sat 27 Aug 2005
    • 1927
    Received from blog

    Printing website kills machine, news at eleven!

    Turns out that Internet Explorer throws a big wobbly if you try to print a webpage which uses “tags” as an id. Who knew? I’d be quite interested to know how they went about sleuthing out that it was the tags id that was the problem, especially since…

    • #9
    • Trackback
    • Sun 28 Aug 2005
    • 1005
    Received from Gea-Suan Lin's BLOG

    IE Bug

    嗯,其實是 hlb 布丁長輩 在 irc 上渡化大眾:
    21:51 <@hlb> gslin: 長輩知道讓 IE crash 的新方法嗎? id=”tags” :p
    21:51 <@gslin> @_@
    21:51 <@hlb> gslin: print preview 就爛掉 :p
    21:51 <@gslin&g…

    • #10
    • Trackback
    • Sun 28 Aug 2005
    • 2042
    Received from Tobias Bergius Blogg

    Utskrift om�jligt i IE

    CSS-gurun Eric Meyer har uppt�ckt en egenhet i Internet Explorers utskriftshantering. Tydligen �r v�rdet tags i id-attributet ett reserverat v�rde. Men varken i HTML- eller XHTML-specifikationen st�r det n�got om detta. Internet Explorer har �nd� valt…

    • #11
    • Trackback
    • Mon 29 Aug 2005
    • 0031
    Received from

    Firefox for Web Design

    Many reasons (extensions) for using Firefox when designing for the Web

    • #12
    • Comment
    • Mon 29 Aug 2005
    • 1236
    Ryan wrote in to say...

    Unfortunately, I’m having a similar problem with Firefox on a site I’m working on, printing causes Firefox to lock up. I have to kill the process to use it again. Anybody know of any specific issues I should be aware of?

    • #13
    • Comment
    • Mon 29 Aug 2005
    • 1252
    Kevin Hamilton wrote in to say...

    Under Microsoft’s DHTML, I guess tags would be a reserved word.

    Because they have that pesky document.all collection, which introduces the tags method, which is akin to document.getElementsByTagName. If you have an element with an id=”foo” then would be a reference to that element.

    if you have an element with an id=”tags”, then document.all.tags is now a reference to that element, and no longer a method of the document.all object.

    It seems this is also true of the other document.all methods ( item, namedItem, and urns ). If you create a simple HTML page with a button whose onclick=”alert(document.all.item)”, clicking the button you will get something like:
    function item(){
    [native code]

    If you add an element with id=”item” then run the test again, you will see [object].

    I don’t know if all four of these keywords will have side-effects like breaking printing, but they certainly would break javascript in unexpected ways if that javascript tries to use micorsoft’s document.all object.

    • #14
    • Comment
    • Mon 29 Aug 2005
    • 1334
    Eric Meyer wrote in to say...

    Kevin– I wondered if it would have something to do with Microsoft’s document.tags. Your point about the other keywords is one I hadn’t taken into consideration, though. Time to construct some test cases. Thanks!

    • #15
    • Pingback
    • Mon 29 Aug 2005
    • 1555
    Received from 黑暗中的舞者 »

    […] 是他把上述代码更换成 Tags and structure 以后,IE又可以正常工作。所以Eric总结出,原来”tags”这段代码,可以让IE崩

    • #16
    • Pingback
    • Mon 29 Aug 2005
    • 1555
    Received from 黑暗中的舞者 » 可以让IE崩溃的HTML代码

    […] 是他把上述代码更换成 Tags and structure 以后,IE又可以正常工作。所以Eric总结出,原来”tags”这段代码,可以让IE崩

    • #17
    • Comment
    • Mon 29 Aug 2005
    • 1821
    Jacques Marneweck wrote in to say...

    Why does Microsoft keep making certain works reserved words. Does that MSSmartTagsPreventParsing set to “true” not fix that issue?

    • #18
    • Trackback
    • Mon 29 Aug 2005
    • 1823
    Received from Dextrose

    Printing website kills IE

    Even a simple CSS ID-tag can crash Microsoft Internet Explorer…

    • #19
    • Comment
    • Mon 29 Aug 2005
    • 1825
    Oliver Zheng wrote in to say...

    That is sad..

    • #20
    • Pingback
    • Mon 29 Aug 2005
    • 1908
    Received from Dextrose » Printing website kills IE

    […] rinting website kills IE Notes Even a simple CSS ID-tag can crash Microsoft Internet Explorer…. Update: […]

    • #21
    • Comment
    • Mon 29 Aug 2005
    • 2314
    Gabriel Castro wrote in to say...

    I also ran into an IE CSS oddity when doing some JavaScript on my own site.

    The comment live preview code I use relies on an <input id="author" /> tag. Seems like a reasonable choice for an ID, right? Well once I added a <meta name="author" /> tag my JavaScript stopped working and I got the same “Object doesn”t support this property or method” message.

    From what I could gather, IE would return the meta tag to a getElementById call. Unfortunately, I haven’t had time to really research further into this problem. Maybe I should make some time…

    • #22
    • Pingback
    • Tue 30 Aug 2005
    • 0100
    Received from ID tags are bad

    […] e ever seen. Don’t ever put the words tags in your id attributes. Eg: id=”tags” Visit Site   Comments are closed. […]

    • #23
    • Pingback
    • Tue 30 Aug 2005
    • 0800
    Received from design.Principles » When Printing Kills

    […] he same error that I helped a colleague with some time back, but through different means. Check it out

    Recent Posts

    • #24
    • Pingback
    • Tue 30 Aug 2005
    • 1040
    Received from el factor humano » Archivo » Otra de IE: Tags

    […] omentarios (0) Una breve nota de utilidad pública vía Eric Meyer: si no quieres que los usuarios de Internet Explorer sufran una caí […]

    • #25
    • Pingback
    • Tue 30 Aug 2005
    • 1422
    Received from Browser und die Druckausgabe » Peruns Blog - Webwork und Internet

    […] text id=”tags”, dann bricht der IE den Druck genau bei dieser Zeile. Weitere Infos gibt es hier. Stichwörter: keine « Blogsysteme als Alternative| […]

    • #26
    • Pingback
    • Tue 30 Aug 2005
    • 1518
    Received from 16-bits: Blog sobre Tecnolog

    […] ; al atributo id de un elemento, en algunas PCs Internet Explorer har

    • #27
    • Pingback
    • Tue 30 Aug 2005
    • 1634
    Received from Web4C » Blog Archive » IE Reserved ID?

    […] IE Reserved ID? IE

    • #28
    • Pingback
    • Tue 30 Aug 2005
    • 1717
    Received from CSS-Technik-News

    […] ken des Facts and Opinions About PDF Accessibility-A LIST Apart-Artikels von Joe Clark zum Absturz des Internet Explorers. Eric Meyer geh

    • #29
    • Pingback
    • Tue 30 Aug 2005
    • 1905
    Received from » Blog Archive » Otro error de IE para la lista, ¡ouch!


    Otro error de IE para la lista, ¡ouch!

    S […]

    • #30
    • Pingback
    • Wed 31 Aug 2005
    • 0602
    Received from Blog CAMYNA » Archivo del Blog » Otro error para Explorer

    […] ebe a que la palabra “tags” es una palabra exclusiva del navegador Internet Explorer. Otros sitios se hacen eco de lo mismo. La solución es muy sencilla, no uses E […]

    • #31
    • Comment
    • Wed 31 Aug 2005
    • 0651
    SugarKane wrote in to say...

    I have seen this a few times before with other words used for id’s.
    If only I had thought to keep a note of them …

    • #32
    • Comment
    • Wed 31 Aug 2005
    • 1355 wrote in to say...
    • #33
    • Comment
    • Wed 31 Aug 2005
    • 2005
    Marty Vance wrote in to say...

    This is nearly identical to the Netscape 4.x bug that prevented form submission if the submit button had the attribute name=”submit” (not Submit, just submit).

    • #34
    • Pingback
    • Thu 1 Sep 2005
    • 0216
    Received from El blog del Señor Bohnke » Otro error en IE

    […] Pedrianes. « El iArm Otro error en IE Se ha confirmado que no se p […]

    • #35
    • Pingback
    • Mon 12 Sep 2005
    • 0316
    Received from » Lecturas sobre hojas de estilo y est

    […] ted Web browser standards support Interview with Dan Cederholm Writing Semantic Markup When Printing Kills Using the AIS Web Accessibility Toolbar Sony site in stan […]

    • #36
    • Pingback
    • Fri 16 Sep 2005
    • 1921
    Received from revelation » Blog Archive » IE - Simply Laughable

    […] this wasn’t enough, Eric Meyer mentioned a very interesting phenomena a while back: some valid [X]HTML actually kills Internet Explorer. It’s not colloquial […]

    • #37
    • Pingback
    • Sun 1 Jan 2006
    • 1613
    Received from Max Design - standards based web design, development and training » Blog Archive » Some links for light reading (12/9/05)

    […] ted Web browser standards support Interview with Dan Cederholm Writing Semantic Markup When Printing Kills Using the AIS Web Accessibility Toolbar Sony site in stan […]

    • #38
    • Trackback
    • Mon 30 Jan 2006
    • 1841
    Received from rh3toric

    Crashing IE6

    While testing sites I rarely have taken the opportunity to test printing on all browsers/platforms. Well the other day a client comes back to me and claims that their site has been crashing and always has when trying to print.Here is the problem:* sit…

    • #39
    • Comment
    • Tue 15 Aug 2006
    • 1352
    Webbie wrote in to say...

    Tags ! That’s it !
    I could kiss you.

    • #40
    • Comment
    • Thu 14 Sep 2006
    • 1345
    Fl0yd wrote in to say...

    Just run into this problem myself. Our user’s couldn’t print our online docs… hmm, I had never had any probs in Firefox…

    Bloody IE! Bloody Microsoft! I’ve wasted a good couple of hours on this…

    • #41
    • Comment
    • Mon 30 Oct 2006
    • 1808
    websparc wrote in to say...

    I appologise for previous comments as trying to put the html tags which are breaking IE while printing. It breaks IE6 and IE7 but works on firefox.

    <input type="radio" disabled="disabled" checked="checked"/>Some
    <font color="black">File Number:</font></td>

    • #42
    • Pingback
    • Thu 29 Mar 2007
    • 1943
    Received from Chad’s dailies » Blog Archive » links for 2007-03-29

    […] When Printing Kills (tags: ie bug printing) […]

    • #43
    • Comment
    • Mon 7 May 2007
    • 0559
    Rajneesh Garg wrote in to say...

    I have my web page designed using DIVs. It also has a Display Tag component (JSP Taglib) which produces a grid using TABLE tab. When I issue print command (Ctrl-P) from this page, and chooses to have landscape mode, IE6 crashes. For Portrait mode, it works fine. I am not using tags as the div id or name. I have Windows 2003 Server running IE6 browser. No separate printing CSS is being used.
    Any pointers?

    • #44
    • Pingback
    • Wed 9 May 2007
    • 0536
    Received from explorer 6, suma y sigue… •

    […] Este error, aunque parezca mentira, lleva documentado desde 2005 […]

    • #45
    • Comment
    • Wed 30 May 2007
    • 1521
    fab wrote in to say...

    Some more reserved Ids:

    On Internet Explorer 6, using id = ‘type’ or ‘description’ or ‘positioning’ will cause ie to crash if you try to access them via document.getElementByID….

    That sucks

    • #46
    • Pingback
    • Wed 27 Feb 2008
    • 2329
    Received from Kill Internet Explorer With CSS

    […] I decide to investigate and sure enough Google comes through. Specific tags in your html code will cause Internet Explorer to crash when you try to print. […]

Leave a Comment

Line and paragraph breaks automatic, e-mail address required but never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Remember to encode character entities if you're posting markup examples! Management reserves the right to edit or remove any comment—especially those that are abusive, irrelevant to the topic at hand, or made by anonymous posters—although honestly, most edits are a matter of fixing mangled markup. Thus the note about encoding your entities. If you're satisfied with what you've written, then go ahead...

August 2005
July September