MIP HTML specification
Header usage specifications
Start tag use<!doctype html>
html tag must be added with mip Tags, that is: <html mip>
must contain <head> and <body> tags
must be in the head tag Contains character set declaration: <meta charset="utf-8">, the character set is unified to
utf-8
- ##The viewport must be included in the head tag Set tag: <meta name="viewport" content="width=device-width,initial-scale=1">, it is recommended to include
minimum-scale=1
- Must include < link rel="stylesheet" type="text/css" href="
https://mipcache.bdstatic.com/static/v1/mip.css## in the head tag #" >
Must include <script src=" - https://mipcache.bdstatic.com/static/v1/mip.js## in the body tag #" ></script >
Must include <link rel="canonical" href="http(s)://xxx" > in the head tag - Page element usage specifications
img
tag withmip-img):
- on
in the MIP HTML are not allowed to be used, such as:
ononclick
,onmouseover
.The
attribute is allowed in MIP HTML.
attribute is not allowed in MIP HTML.The
styleCustom style usage specifications
Due to performance considerations, inline style is not allowed in html, and all styles can only be placed in the style tag of the head.
- Correct:
<head> <style mip-custom> p { color: #00f;} </style> </head> <body> <p>Hello World!</p> </body>
- Error:
<p style="color:#00f;">Hello World!</p>
Verification specification
MIP verification tool address: