简体   繁体   English

问答页面的架构标记

[英]Schema markup for Q&A page

I am trying to implement schema.org tags in my website. 我想在我的网站上实现schema.org标签。 I need to implement a Q&A page. 我需要实现一个问答页面。 however when I try to add all three tags in the same HTML page they are all messed up with each other. 但是,当我尝试在同一个HTML页面中添加所有三个标签时,它们都互相混淆了。 I am trying to do it the same as the Stack Overflow website. 我试图像Stack Overflow网站一样做。 I need to know what I am doing wrong here is my code 我需要知道我在做错了我的代码

<html lang="en" itemscope itemtype="http://schema.org/QAPage" <meta property="og:description" itemprop="description" content="You can ask EasySchools about any school you want to know its details such like fees, website, phone number, facebook, certificate, facilities, location. ">
<meta property="og:image" itemprop="image primaryImageOfPage" content="https://www.easyschools.org/backend/website/social.png ">

It's supposed to end here and then start Question and Answers item tags but they are all mixed up with each other. 它应该在这里结束,然后启动问题和答案项目标签,但他们都相互混淆。 Here is my question and answers code: 这是我的问题和答案代码:

<div itemscope itemtype="http://schema.org/Question" class="col-md-9 text-left">
  <link itemprop="image" href="https://www.easyschools.org/uploads/main/images/Dn64LgiE9cJ5997qxyFc0rl7Omf9AzECsfL0HYBS.png">
  <h4 itemprop="name">تقديم المدارس الناشونيل شهر 5 او 6 فى مدينة نصر وا التجمع</h4>
</div>


<div class="col-md-12 col-xs-12" itemscope itemtype="http://schema.org/Answer">
  <div class="col-md-11 col-md-offset-1 col-xs-12">
    <h4 class="user pull-left">EasySchools</h4>
    <h5 class="pull-right">2018-05-13 12:09:01</h5>
  </div>
  <div class="col-md-1 col-xs-1 pic"><img src=https://www.easyschools.org/backend/website/pic/thumb.png alt="EasySchools-answer"></div>
  <div class="col-md-7 text-left padding-fix">
    <h4 itemprop="text">دي حضرتك المدارس الي موجوده ف التجمع تقدر تحدد المدرسه الي حضرتك عايزها وتدخل عل المدرسه هتلقي كل التفاصيل الي حضرتك عايزها زي لينك التقديم و ارقام التليفوناتhttps://www.easyschools.org/en/schools/advsearch?city=cairo&amp;district=new-cairo&amp;rangeOne=1&amp;rangeTwo=250000</h4>
  </div>
  <div class="col-md-4 text-right"></div>
</div>

here is the link of my page to test if needed: 这是我的页面链接,如果需要测试:

https://www.easyschools.org/en/showQuestion/174 https://www.easyschools.org/en/showQuestion/174

You need to use properties to link the items. 您需要使用属性来链接项目。 Currently you have a QAPage , a Question , and an Answer , but they aren't related in any way. 目前您有QAPageQuestionAnswer ,但它们没有任何关联。

Check the relevant type pages on http://schema.org/ : 检查http://schema.org/上的相关类型页面:

Note that you typically don't have to provide the properties in both directions. 请注意,您通常不必在两个方向上提供属性。 So, for example, if you use acceptedAnswer / suggestedAnswer in the Question , you typically don't have to use parentItem in the Answer . 因此,例如,如果您在Question使用acceptedAnswer / suggestedAnswer ,则通常不必在Answer使用parentItem However, in theory, some consumers might only support one direction. 然而,从理论上讲,一些消费者可能只支持一个方向。

If you can't nest the HTML elements, you can use itemref . 如果无法嵌套HTML元素,则可以使用itemref

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM