HTML图像映射为SiteNavigationElement [英] HTML image map as SiteNavigationElement

查看:107
本文介绍了HTML图像映射为SiteNavigationElement的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算将HTML图像映射用作schema.org SiteNavigationElement

I’m planning to use an HTML image map as a schema.org SiteNavigationElement.

这个想法是使用图像作为场地地图和视觉辅助,以查找我所在地区的本地商家。

The idea is to use the image as a venue map and as a visual aid to find local business in my area.

通过Google结构化数据测试工具验证代码和所有内容似乎没问题。

The code was validated through the Google Structured Data Testing Tool and everything seems to be ok.

<div itemscope itemtype="http://schema.org/SiteNavigationElement" >
  <div itemprop="name">the name</div>
  <div itemprop="description">the description</div>
  <img itemprop="image" src="map.jpg" usemap="#map_tag"/>
  <map name="#map_tag">
    <area itemprop="url" coords="1, 2, 3, 4" href="link1.php" shape="rect" alt="alt_text1"/>
    <area itemprop="url" coords="5, 5, 7, 8" href="link2.php" shape="rect" alt="alt_text2"/>
  </map>
</div>

这是 SiteNavigationElement 的有效用途吗?

推荐答案

不, url 属性SiteNavigationElement 用于导航的URI(它不太可能有),而不是导航包含的链接的URL。请参阅我的回答schema.org SiteNavigationElement的正确用法是什么?

No, the url property of SiteNavigationElement is for the URI of the navigation (it’s unlikely to have one), not for the URLs of the links the navigation contains. See my answer to "What is the correct use of schema.org SiteNavigationElement?".

除此之外,它似乎是合适的。但是(当然,因为您只使用示例文本),名称应该给出名称(以及描述描述)导航本身,而不是页面等。

Apart from that, it seems to be appropriate. However (to be sure, as you are only using example text), the name should give the name (and the description the description) of the navigation itself, not of the page etc.

(请注意,使用这些 WebPageElement 类型。它会不时地讨论在Schema.org中弃用它们我只会在特定/罕见情况中使用它们。)

(Note that it’s typically not very useful to use these WebPageElement types to begin with. It gets from time to time discussed to deprecate them in Schema.org. I’d only use them in very specific/rare cases.)

这篇关于HTML图像映射为SiteNavigationElement的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆