3

I am trying to implement schema.org tags in my website. 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. I am trying to do it the same as the Stack Overflow website. 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

2
  • 1) Your start html tag misses the closing >. Is this a copy-paste error, or do you actually miss it? 2) What does "they are all messed up with each other" or "mixed up with each other" mean? Commented May 14, 2018 at 13:20
  • @unor yeah i missed it by mistake in here. i mean messed up that accepted answer and suggested answers should below to the Question schema while when i test it says it belong to the QApage so i need to know how to differentiate it? you can test the link to understand what i mean Commented May 14, 2018 at 13:47

1 Answer 1

3

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.

Check the relevant type pages on 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. However, in theory, some consumers might only support one direction.

If you can’t nest the HTML elements, you can use itemref.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.