When can I safely use the new
element in HTML5?

前端 未结 4 1144
南旧
南旧 2021-02-02 09:05

On the 16th December, a HTML5 extension specification for the

element was submitted to the W3C under something called an editors draft. The abstract is
4条回答
  •  眼角桃花
    2021-02-02 09:51

    You can go ahead and use it, Chrome 26 and Firefox 21 already implemented it.

    Just as with the introduction of many other new HTML5 elements, not all browsers recognise

    or have preset styles for it. You’ll need to ensure it displays as a block level element in your CSS:

    main {display:block;}
    

    For the time being, you'll also need to use JavaScript to create the element for older versions of IE:

    
    

    Of course, if you use the html5shiv,

    is now baked in directly.

提交回复
热议问题