Skip to content

IE 6 Gotcha Moment: HTML Button Element

by aaron on November 13th, 2007

So, for the past hour I’ve been trying to figure out why a website I’m working simply fails to render on IE 6. I finally traced it down to a rogue button element, which appeared to be well-constructed but was still making IE 6 barf spectacularly. In the off-chance this ever happens to anyone else, here’s a tip: ensure that your button elements are constructed with a real closing tag as opposed to the short form (or whatever the real name for it is).

i.e.: <button> </button> instead of <button />

Possibly Related Posts:


From → Web Design

  • Larry V

    Hmm, those examples of button code are actually being rendered as buttons :P

  • http://brethorsting.com aaron

    Hey Larry – I guess you’re not using IE 6 ;-) Fixed… It always throws me that WordPress doesn’t support WYSIWYG blog editing in Safari.

  • Ryan

    This has bitten me big time in the past, and it applies to other tags, as well — script and span come to mind. It’s gotten to where I simply always use an explicit closing tag in HTML except for tags that don’t have any content. It’s just safer.

blog comments powered by Disqus