Mip html specification description mip html specification introduction

Source: Internet
Author: User
Tags character set

Header usage specification

  • Start tag usage <! Doctype html>

  • The html tag must be tagged with mip, that is,

  • Must contain

  • The head label must contain the character set Declaration <meta charset = "utf-8">. The character set must be UTF-8.

  • The head label must contain the viewport setting label: <meta name = "viewport" content = "width = device-width, initial-scale = 1">, recommended include minimum-scale = 1

  • The head label must contain <link rel = "stylesheet" type = "text/css" href = "https://mipcache.bdstatic.com/static/v1/mip.css">

  • The body tag must contain <script src = "https://mipcache.bdstatic.com/static/v1/mip.js"> </script>

  • The head label must contain <link rel = "canonical" href = "http (s): // xxx">

Page element usage specification

Mip html prohibits the use of tags that have a great impact on page performance and security. Replace the tags with the unique tags of MIP (for example, replace img tags with mip-img ):

Tag Scope of use Remarks
Img Replace with mip-img
Video Replace with mip-video
Audio Replace with mip-audio
Iframe Replace with mip-iframe
Style Replace with <style mip-custom> It can be used only once in the head label.
Script Disable Script tags are not allowed, except in the following two cases: 1) js required for the external link mip component, 2) type is "application/ld + json" or "application/json"
Svg Allowed
Button Allowed
Link Allowed
A Allowed. We recommend that you use the mip-link component instead. Href = "javascript:" is not allowed. The target must be set to _ blank.
Frame Disable
Frameset Disable
Object Disable
Param Disable
Applet Disable
Embed Disable
Form Replace with mip-form The input and textarea labels can be used internally.
Input elements Disable Including: select, option

HTML attributes

  • All attributes starting with on in mip html cannot be used, such as onclick and onmouseover.
  • The on attribute is allowed in mip html.
  • Style attribute is not allowed in mip html.

Custom style usage specification

For performance considerations, inline style is not allowed in html. All styles can only be placed in the style label of the head.

Correct:

<Head>

<Stylemip-custom>

P {color: # 00f ;}

</Style>

</Head>

<Body>

<P> Hello World! </P>

</Body>

Error:

<Pstyle = "color: # 00f;"> Hello World! </P>

Verification specification

MIP verification tool address: https://www.mipengine.org/validator/validate

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.