Html5 tags are compatible with earlier browsers and html5 tags

Source: Internet
Author: User

Html5 tags are compatible with earlier browsers and html5 tags

As html5 (represented by h5 later) labels become more and more widely used, it is annoying that IE does not recognize h5 labels.

In Firefox, chrome, and other browsers, if you encounter unknown labels, you only need to give a display: block attribute to make this element a div-like element, however, it is disgusting to be on IE. If you do not know it, you do not know it. If you add anything in html or css, it ignores you.

Nothing can be solved by the omnipotent programmer. In fact, it is necessary for IE to identify a custom tag (IE considers h5 tags as unfamiliar and illegal ), just add a line of JS Code:

Document. createElement ("Enter the tag name here ");

This statement can be understood as: I want to create a new tag, IE, you don't know it again!

It's easy, isn't it? However, there are a lot of h5 labels. It takes time to manually create one by one, but it may be wrong or missing. When a BUG occurs, it cannot be solved. Therefore, we recommend two plug-ins specifically designed to ensure h5 label compatibility with IE. You only need to introduce them and do not need to do anything extra:

The Github address of the above two plug-ins is attached below:

Bsie -- Github Link

Html5shiv -- Github Link

 

If you think this article can help you, please go to my Github and click the stars.

 

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.