开发者

schema.org - Can a "Restaurant" be part of a "ItemPage"?

I'm new to schema.org and 开发者_StackOverflowtrying to describe a website for a restaurant. Basically the website looks like this:

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

Is it valid to place a "Restaurant" (Thing->Organization...) within the scope of a "Itempage" (Thing->CreativeWork)? The documentation shows that the "Restaurant" is not part of the scope of a "ItemPage". On the other hand the "ItemPage" is described "A page devoted to a single item, such as a particular product or hotel.". So a hotel is similar to a restaurant ;) Is this type of nesting valid?

Thanks


You shouldn't need the ItemPage as part of the body. You can just start specifying the restaurant in one of the divs, then make sure the rest of the properties are defined as children. Like so:

<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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜