{"id":16260682,"url":"https://github.com/givebest/html5-template","last_synced_at":"2026-02-02T12:41:43.124Z","repository":{"id":70333981,"uuid":"91783572","full_name":"givebest/HTML5-Template","owner":"givebest","description":null,"archived":false,"fork":false,"pushed_at":"2017-07-25T07:14:08.000Z","size":5,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-28T08:39:19.509Z","etag":null,"topics":["html5-template"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/givebest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-19T08:24:15.000Z","updated_at":"2020-04-23T18:58:31.000Z","dependencies_parsed_at":"2023-07-27T04:30:44.580Z","dependency_job_id":null,"html_url":"https://github.com/givebest/HTML5-Template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/givebest/HTML5-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givebest%2FHTML5-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givebest%2FHTML5-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givebest%2FHTML5-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givebest%2FHTML5-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/givebest","download_url":"https://codeload.github.com/givebest/HTML5-Template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givebest%2FHTML5-Template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29012681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T10:37:29.253Z","status":"ssl_error","status_checked_at":"2026-02-02T10:37:28.644Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html5-template"],"created_at":"2024-10-10T16:20:43.003Z","updated_at":"2026-02-02T12:41:43.092Z","avatar_url":"https://github.com/givebest.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTML5 常用 meta 标签\n\nHTML5可复用模板，尽可能保持简洁。\n\n### DOCTYPE\n\n```html\n\u003c!DOCTYPE html\u003e\n```\n\n### charset\n\n```html\n\u003cmeta charset=\"utf-8\"\u003e\n```\n\n### lang\n\n```html\n\u003c!-- google --\u003e\n\u003chtml lang=\"zh-CN\"\u003e\n```\n\n\u003e [网页头部的声明应该是用 lang=\"zh\" 还是 lang=\"zh-cn\"？](https://www.zhihu.com/question/20797118)\n\n\n### 优先使用 IE 最新版本和 Chrome\n\n```html\n\u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\"\u003e\n```\n\n### 360 使用 WebKit\n\n```html\n\u003cmeta name=\"renderer\" content=\"webkit\"\u003e\n```\n\n### 移动优先\n\n```html\n\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"\u003e\n```\n\n### 禁止自动转换为电话号码\n\n```html\n\u003c!-- google --\u003e\n\u003cmeta name=\"format-detection\" content=\"telephone=no\"\u003e\n```\n\n### Favicon icon\n\n```html\n\u003c!-- Yahoo --\u003e\n\u003clink rel=\"shortcut icon\" href=\"https://s.yimg.com/rz/l/favicon.ico\"\u003e\n```\n\n### iOS 添加网页放到主屏幕展示的图标\n\n```html\n\u003c!-- Amazon --\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"apple-touch-icon.png\"\u003e\n```\n\n### 百度禁止转码\n\n```html\n\u003cmeta http-equiv=\"Cache-Control\" content=\"no-siteapp\"\u003e\n```\n\n### 手机QQ浏览器x5内核定制\u003cmeta\u003e标签说明\n\n\u003e 详见：[http://open.mb.qq.com/web/doc?id=1201#_1](http://open.mb.qq.com/web/doc?id=1201#_1)\n\n#### 1. x5-orientation：横竖屏控制 \n* landscape：强制横屏\n  实例说明：\n\n  ```html\n  \u003cmeta name=\"x5-orientation\" content=\"landscape\"/\u003e\n  ```\n* portrait：强制竖屏\n  实例说明：\n\n  ```html\n  \u003cmeta name=\"x5-orientation\" content=\"portrait\"/\u003e\n  ```\n* auto：跟随浏览器设置【默认】\n  实例说明：\n\n  ```html\n  \u003cmeta name=\"x5-orientation\" content=\"auto\"/\u003e\n  ```\n\n#### 2. x5-fullscreen：全屏控制\n\n* true：强制全屏\n  实例说明：\n\n  ```html\n  \u003cmeta name=\"x5-fullscreen\" content=\"true\"/\u003e\n  ```\n\n* auto：跟随浏览器设置【默认】\n  实例说明：\n  ```html\n  \u003cmeta name=\"x5-fullscreen\" content=\"auto\"/\u003e\n  ```\n\n#### 3. x5-page-mode ：页面模式\n\n* default：普通浏览模式【默认】\n  实例说明：\n  ```html\n  \u003cmeta name=\"x5-page-mode\" content=\"default\"/\u003e\n  ```\n\n* app：网页应用模式（定制工具栏，全屏显示）\n  实例说明：\n  ```html\n  \u003cmeta name=\"x5-page-mode\" content=\"app\"/\u003e\n  ```\n\n### 其它\n\n```html\n\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\" /\u003e\n\u003cmeta name=\"apple-mobile-web-app-capable\" content=\"yes\" /\u003e\n\u003cmeta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\" /\u003e\n\u003cmeta name=\"format-detection\"content=\"telephone=no, email=no\" /\u003e\n\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\" /\u003e\n\u003cmeta name=\"apple-mobile-web-app-capable\" content=\"yes\" /\u003e\u003c!-- 删除苹果默认的工具栏和菜单栏 --\u003e\n\u003cmeta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\" /\u003e\u003c!-- 设置苹果工具栏颜色 --\u003e\n\u003cmeta name=\"format-detection\" content=\"telphone=no, email=no\" /\u003e\u003c!-- 忽略页面中的数字识别为电话，忽略email识别 --\u003e\n\u003c!-- 启用360浏览器的极速模式(webkit) --\u003e\n\u003cmeta name=\"renderer\" content=\"webkit\"\u003e\n\u003c!-- 避免IE使用兼容模式 --\u003e\n\u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"\u003e\n\u003c!-- 针对手持设备优化，主要是针对一些老的不识别viewport的浏览器，比如黑莓 --\u003e\n\u003cmeta name=\"HandheldFriendly\" content=\"true\"\u003e\n\u003c!-- 微软的老式浏览器 --\u003e\n\u003cmeta name=\"MobileOptimized\" content=\"320\"\u003e\n\u003c!-- uc强制竖屏 --\u003e\n\u003cmeta name=\"screen-orientation\" content=\"portrait\"\u003e\n\u003c!-- QQ强制竖屏 --\u003e\n\u003cmeta name=\"x5-orientation\" content=\"portrait\"\u003e\n\u003c!-- UC强制全屏 --\u003e\n\u003cmeta name=\"full-screen\" content=\"yes\"\u003e\n\u003c!-- QQ强制全屏 --\u003e\n\u003cmeta name=\"x5-fullscreen\" content=\"true\"\u003e\n\u003c!-- UC应用模式 --\u003e\n\u003cmeta name=\"browsermode\" content=\"application\"\u003e\n\u003c!-- QQ应用模式 --\u003e\n\u003cmeta name=\"x5-page-mode\" content=\"app\"\u003e\n\u003c!-- windows phone 点击无高光 --\u003e\n\u003cmeta name=\"msapplication-tap-highlight\" content=\"no\"\u003e\n\u003c!-- 适应移动端end --\u003e\n```\n\n\n## 参考\n\n* [QQ手机浏览器 x5内核定制\u003cmeta\u003e标签说明](http://open.mb.qq.com/web/doc?id=1201)\n* [https://github.com/h5bp/html5-boilerplate](https://github.com/h5bp/html5-boilerplate)\n* [http://fex.baidu.com/blog/2014/10/html-head-tags/](http://fex.baidu.com/blog/2014/10/html-head-tags/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgivebest%2Fhtml5-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgivebest%2Fhtml5-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgivebest%2Fhtml5-template/lists"}