快推365SEO问答正文

MIP-HTML是什么?MIP-HTML详解

2020/12/16 15:57:44

697浏览量

MIP

回答

2020/12/16 15:58:21

MIP-HTML

MIP-HTML 基于 HTML 基础规范进行了扩展。

下面是一段简单的 MIP-HTML 代码示例:

123456789101112131415161718192021222324<!DOCTYPE html><html mip>

<head>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">

  <link rel="stylesheet" type="text/css" href="https://c.mipcdn.com/static/v2/mip.css">

  <link rel="canonical" href="https://www.example.com/your/path.html">

  <!-- noscript 标签是为了在不支持 script 的环境下快速的展现 MIP 页面,推荐使用 -->

  <noscript>

    <style mip-officialrelease>


     body {          -webkit-animation: none;            

-moz-animation: none;              -ms-animation: none;                

animation: none;

      }      <st<x>yle>

  </noscript>

</head>

<body>

  <h1>Hello World!</h1>

  <script src="https://c.mipcdn.com/static/v2/mip.js"><sc<x>ript>

</body></html>


MIP-HTML 规范中有两类标签,一类是 HTML 常规标签,另一类是 MIP 标签。MIP 标签也被称作 MIP-HTML 组件,使用它们来替代 HTML 常规标签可以大幅提升页面性能。

例如:<mip-img>标签,它使得图片只在需要时才进行加载,减少了页面渲染时间,节省了用户的流量。



此教程来源于《搜外网-夫唯SEO培训》,网址:https://www.seowhy.com/

本教程连接:https://www.seowhy.com/a/994.html 为原创表示感谢!



0+1

0+1