【问题标题】:schema.org - Can a "Restaurant" be part of a "ItemPage"?schema.org - “餐厅”可以成为“ItemPage”的一部分吗?
【发布时间】:2011-09-29 04:11:51
【问题描述】:

我是 schema.org 的新手,并试图描述一个网站 餐厅。网站基本上是这样的:

<body itemscope itemtype="http://schema.org/ItemPage">
   <div itemprop="breadcrumb">...</div>
   <div itemscope itemtype="http://schema.org/Restaurant">...</div>
</body>

在其中放置“餐厅”(事物->组织...)是否有效 “项目页面”(Thing->CreativeWork)的范围?文档 表明“餐厅”不是“ItemPage”范围的一部分。 另一方面,“ItemPage”被描述为“专门用于 单个项目,例如特定产品或酒店。”。所以酒店是 类似于餐厅 ;) 这种嵌套有效吗?

谢谢

【问题讨论】:

    标签: html semantics


    【解决方案1】:

    您不应该需要 ItemPage 作为正文的一部分。您可以开始在其中一个 div 中指定餐厅,然后确保将其余属性定义为子属性。像这样:

    <body>
        <div>...</div>
        <div itemscope itemtype="http://schema.org/Restaurant">
            <span itemprop="name">McDonald's</span>
            <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
                <span itemprop="streetAddress">1234 Smith Ave</span>
                <span itemprop="addressLocality">Seattle</span>
                ....
            </div>
        </div>
    </body>
    

    【讨论】:

    • 他在哪里放置面包屑?....这就是他需要 ItemPage 或 WebPage 的原因。
    猜你喜欢
    • 1970-01-01
    • 2016-08-04
    • 2016-11-23
    • 1970-01-01
    • 1970-01-01
    • 2022-09-22
    • 2019-05-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多