AMP là gì? Cách thêm AMP cho Blogger
AMP (Accelerated Mobile Pages) là một dự án của Google hỗ trợ tăng tốc độ load trang trên di động các trang AMP đã được xác thực được lưu trong bộ nhớ cache AMP của Google và điều này cho phép tải trang nhanh hơn đem đến trải nghiệm tuyệt vời cho người dùng.
![]() |
Cách thêm AMP cho Blogger |
<html amp='amp'>
Tiếp theo copy đoạn code bên dưới sau thẻ
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
Bước 2: Copy đoạn code này phía sau thẻ
<link expr:href='data:blog.url' rel='canonical'/>
Bước 3: Tiếp tục tìm đến thẻ đóng
<style
amp-boilerplate='amp-boilerplate'>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal
both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes
-amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes
-amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes
-amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes
-amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes
-amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style
amp-boilerplate='amp-boilerplate'>body{-webkit-animation:none;-moz-anim
ation:none;-ms-animation:none;animation:none}</style></noscript>
<script async='async' src='https://cdn.ampproject.org/v0.js'></script>
Chú ý: Khi bạn chỉnh sửa các code liên quan đến hình ảnh bạn có thể dùng code phía dưới theo chuẩn AMP
<amp-img src="AmpImage.jpg" alt="amp-img" height="500" width="500"></amp-img>
Chúc các bạn thành công!
Nguồn: Internet
Đăng nhận xét