HTML5 compatible with IE and html5ie browsers

Source: Internet
Author: User

HTML5 compatible with IE and html5ie browsers
Java code

  • <! Doctype html>
  • <Html>
  • <Head>
  • <Meta charset = "UTF-8">
  • <Title> </title>
  • <! -- [If IE]>
  • <Script type = "text/javascript">
  • (Function () {if (! /* @ Cc_on! @ */0) return; var e = "abbr, article, aside, audio, canvas, datalist, details, dialog, eventsource, figure, footer, header, hgroup, mark, menu, meter, nav, output, progress, section, time, video ". split (','), I = e. length; while (I --) {document. createElement (e [I])}) ();
  • </Script>
  • <! [Endif] -->
  • </Head>
  • <Style type = "text/css">
  • Header, nav, aside, article, footer {display: block ;}
  • </Style>
  • <Body>
  • <Header>
  • <P class = "f_r"> <a> mobile access </a> | <a> website Map </a> | <a> route entry </a> | <> Add your site to favorites </a> </p>
  • </Header>
  • <Nav>
  • <Ul>
  • <Li> Navigation 1 </li>
  • <Li> navigation 2 </li>
  • <Li> navigation 3 </li>
  • </Ul>
  • </Nav>
  • <Article> content </article>
  • <Aside>
  • Barrier
  • </Aside>
  • <Footer>
  • <P> ICP filing information </p>
  • </Footer>
  • </Body>
  • </Html>
  • <! Doctype html> 
    

     

    The Code is as follows. HTML5 labels are created through JS. 

    Java code
  • <! -- [If IE]>
  • <Script type = "text/javascript">
  • (Function () {if (! /* @ Cc_on! @ */0) return; var e = "abbr, article, aside, audio, canvas, datalist, details, dialog, eventsource, figure, footer, header, hgroup, mark, menu, meter, nav, output, progress, section, time, video ". split (','), I = e. length; while (I --) {document. createElement (e [I])}) ();
  • </Script>
  • <! [Endif] -->
  • <!--[if IE]><script type="text/javascript">(function(){if(!/*@cc_on!@*/0)return;var e ="abbr,article,aside,audio,canvas,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(','),i=e.length;while(i--){document.createElement(e[i])}})();</script><![endif]-->

     

    The Code is as follows. These labels are block-level labels, so these labels are converted into block-level labels.

    Java code
  • Header, nav, aside, article, footer {display: block ;}
  • header,nav,aside,article,footer{ display:block;}

     

    :

     

    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.