• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WittySparks Logo White

WittySparks

Ignite Your Thoughts

  • Topics
  • Reviews
  • Newsletter
WittySparks / Technology / Programming / Printing HTML5 in Internet Explorer with IE Print Protector

Printing HTML5 in Internet Explorer with IE Print Protector

Programming Updated: August 30, 2022 by Sravan K

HTML5 is the proposed next standard for HTML 4.01, XHTML 1.0 and DOM Level 2 HTML and is estimated that HTML5 will reach W3C Recommendation by late 2010. Since the new HTML5 has got many new elements and attributes which reflect the usage on modern websites, here IECSS has come up with the solution to print HTML5 pages with a proper format by using their new IE Print Protector.

Printing HTML5 in Internet Explorer with IE Print Protector
Printing HTML5 in Internet Explorer with IE Print Protector

IE Print Protector, a piece of JavaScript that allows us to print HTML5 pages in Internet Explorer by rendering the new HTML5 elements in a proper format on both screens and also in print. Internet Explorer 6, 7, and 8 do not recognize new HTML5 elements.

IE treats unknown element start <section> and end </section> tags as void elements. This means unknown elements no longer wrap their contents or won’t format the page well and making them impossible to style and spilling their contents into the DOM.

How exactly IE Print Protector works?

To display the new HTML5 elements in almost all the IE browsers, IE Print Protector uses a shim, a piece of JavaScript that forces support for HTML5 elements in all the versions of Internet Explorer.

How HTML5 elements are rendered?

This is what the IECSS team explains: To display elements correctly in print, IE Print Protector temporarily replaces HTML5 elements with supported fallback elements (like div and span) when you print.

IE Print Protector also creates a special style sheet or CSS for these elements based on your existing styles; this means you can safely style HTML5 elements by element name in links, styles, @imports, and @media. Immediately after, IE Print Protector restores the original HTML5 element to the page, right where you left it. Any references to those elements and any events on those elements will remain intact.

Check out their example HTML5 page with IE Print Protector.

If you found this interesting – you can give it a try by downloading the IE Print Protector Javascript here. And why not share your thoughts about this cool tool.

Previous Post: « TIME – Vote for Leaders and Achievers from INDIA in 2010
Next Post: Simple jQuery Zebra Stripe Table with Row Hover and Highlight class »
Profile picture for Sravan K

About Sravan K

Contributor at WittySparks
WittySparks Staff

Sravan is a highly experienced web designer, user experience designer and developer. You can connect with him on Twitter or LinkedIn and initiate a chat.

View all posts by Sravan K

Primary Sidebar

Featured Productivity Software

Notion logo
Notion

Whether you’re a solo entrepreneur or a large team, Notion Workspace can help you stay organized and get more done. Get started today and take your productivity to the next level.

Try Notion for FREE

Related Topics

  • PHP: Is it the best Programming Language ever?
  • How To Build A Great Search Box On Your Website
  • How to make Python3 version default in Windows OS?
  • Latest Java Technologies & Trends for 2020
  • Facts about React Native you are still unaware of!
  • Top JavaScript trends for 2020

Exclusive Coupons

  • Moqups coupon code: WITTYSPARKS for 20% or PARTNERS50 for 50% discount.
  • WPForms coupon code: WITTYSPARKS for 50% off.
  • Serpstat coupon code: wittysparks_discount for 30% off.
  • SEO Buddy coupon code: WITTYSPARKS for 25% off.
  • Morningscore coupon code: wittysparks for 30% off for 3 months.
  • FlexClip coupon code: WITTYSPARKS for 30% off.
  • Uplead coupon code: “witty” for 30-day free trial.
  • FastestVPN coupon codes: WITTYSPARKS15 or WITTYSPARKS10 or Get up to 93% OFF.
  • Outranking.io coupon code: WITTYSPARKS50 for 50% off.

For more such offers visit our exclusive offers for SEO, Bloggers, Marketers and for Business owners.

Footer

Affiliate Disclosure

If you make a purchase from WittySparks links, we will receive a small commission. See our Affiliate Disclosure.

Sponsors

Partnered with FreePik to use the licensed images.

turn to dhgate for smartphone

Follow Us

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn
  • Instagram
  • YouTube
  • RSS

Copyright © 2023 · Hosting sponsored by Rocket.net (Affiliate link)

  • About Us
  • Contact Us
  • Privacy Policy
  • LinkedIn
  • Twitter
  • Like
  • Pinterest