掩月天权 2024-06-07 14:02 采纳率: 75%
浏览 3
已结题

除了必须的charset、keyword、description、viewport等

网页开发中的meta标签是否需要那么多?

除了必须的charset、keyword、description、viewport等,其他是需要的吗?

<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="KAKOFUN">
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="kakofun">
<meta name="color-scheme" content="light dark">
<meta name="robots" content="max-image-preview:large">
<meta name="format-detection" content="telephone=no">

<link rel="apple-touch-icon" href="https://kakofun.com/kako.png">

<meta data-react-helmet="true" property="og:title" content="kakofun.com-All the wonderful H5 games are here.">
<meta data-react-helmet="true" property="og:description" content="All the wonderful H5 games are here.">
<meta data-react-helmet="true" property="og:image" content="https://kakofun.com/kako.png">
<meta data-react-helmet="true" property="og:image:alt" content="Online free game in KAKOFUN">
<meta data-react-helmet="true" property="og:image:type" content="image/png">
<meta data-react-helmet="true" property="og:site_name" content="kakofun">
<meta data-react-helmet="true" property="og:type" content="website">

<meta name="keywords" content="KAKOFUN,kako,free online games,web game,H5 game">
<meta name="description" content="Free online and wonderful H5 games are here.">

<meta data-react-helmet="true" property="twitter:card" content="summary_large_image">
<meta data-react-helmet="true" property="twitter:title" content="kakofun.com">
<meta data-react-helmet="true" property="twitter:description"
    content="Free online and wonderful H5 games are here.">
<meta data-react-helmet="true" property="twitter:image" content="https://kakofun.com/kako.png">
<meta data-react-helmet="true" property="twitter:image:alt" content="Free online games in KAKOFUN">
<meta data-react-helmet="true" property="twitter:site" content="@kakofun">

<meta name="HandheldFriendly" content="true">

<meta name="apple-mobile-web-app-title" content="kakofun-All the wonderful H5 games are here.">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="format-detection" content="telephone=no" />
<meta name="google" value="notranslate">

<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="robots" content="index,follow">

<meta name="format-detection" content="telephone=no,email=no" />

<meta name="viewport" content="width=device-width, initial-scale=1.0">
  • 写回答

3条回答 默认 最新

  • 阿里嘎多学长 2024-06-07 14:02
    关注

    以下内容由CHATGPT及阿里嘎多学长共同生成、有用望采纳:


    在网页开发中,meta标签用于提供关于HTML文档的元数据。一些meta标签是必需的,而其他一些则取决于特定需求或优化目标。以下是您提到的meta标签的用途和使用场景的概述:

    1. charset="UTF-8": 必须使用,用于指定页面的字符编码,确保文本正确显示。

    2. name="apple-mobile-web-app-capable" content="yes": 对于希望在苹果设备上提供类似原生应用体验的网站,这个标签是有用的。

    3. name="apple-mobile-web-app-status-bar-style" content="black-translucent": 与上述标签配合使用,设置状态栏的样式。

    4. name="mobile-web-app-capable" content="yes": 对于希望在安卓设备上提供Web应用模式的网站,这个标签是有用的。

    5. name="application-name" content="kakofun": 当用户将网站添加到主屏幕时,这个名称将显示为应用名称。

    6. name="color-scheme" content="light dark": 用于定义页面支持的明暗模式,适应用户的系统设置。

    7. name="robots" content="max-image-preview:large": 控制搜索引擎如何索引页面,特别是图片的预览大小。

    8. name="format-detection" content="telephone=no": 防止移动设备将页面中的电话号码识别为可拨打链接。

    9. rel="apple-touch-icon": 定义苹果设备上的图标链接,提高品牌识别度。

    10. property="og:*": 用于Open Graph协议,控制社交媒体分享时的预览信息,提高分享内容的吸引力。

    11. name="keywords" content="...": 尽管搜索引擎不再依赖这个标签来确定页面相关性,但它可以提供页面主题的快速参考。

    12. name="description" content="...": 页面描述在搜索引擎结果页面显示,对吸引用户点击有重要作用。

    13. name="HandheldFriendly" content="true": 这个标签已经过时,现代浏览器默认对手持设备友好。

    14. name="renderer" content="webkit": 指定页面渲染引擎,但在现代浏览器中通常不是必须的。

    15. http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1": 用于指定页面在旧版IE浏览器中的渲染模式,对于现代浏览器不是必须的。

    16. http-equiv="Cache-Control" content="no-siteapp": 控制页面缓存行为,防止某些网站应用缓存机制影响页面显示。

    17. name="viewport" content="...": 必须使用,用于控制页面的视口设置,确保页面在不同设备上正确缩放。

    代码实现示例:

    <!DOCTYPE html>
    <html lang="zh">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="这里是页面描述...">
        <meta name="keywords" content="关键词1,关键词2,关键词3">
        <meta name="robots" content="max-image-preview:large">
        <!-- 其他meta标签 -->
        <title>页面标题</title>
    </head>
    <body>
        <!-- 页面内容 -->
    </body>
    </html>
    

    参考资料:

    请注意,随着网页开发实践的不断演进,某些标签的重要性可能会变化。始终关注最新的开发指南和最佳实践是明智的。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 7月11日
  • 已采纳回答 7月3日
  • 创建了问题 6月7日

悬赏问题

  • ¥15 无法输出helloworld
  • ¥15 高通uboot 打印ubi init err 22
  • ¥20 PDF元数据中的XMP媒体管理属性
  • ¥15 R语言中lasso回归报错
  • ¥15 网站突然不能访问了,上午还好好的
  • ¥15 有没有dl可以帮弄”我去图书馆”秒选道具和积分
  • ¥15 semrush,SEO,内嵌网站,api
  • ¥15 Stata:为什么reghdfe后的因变量没有被发现识别啊
  • ¥15 振荡电路,ADS仿真
  • ¥15 关于#c语言#的问题,请各位专家解答!