Question

A specific question - e.g. from a user seeking answers online, or collected in a Frequently Asked Questions (FAQ) document.

Example eg-0090

Without Markup (source lint)

John asked Steve 'What is 2 + 2?'.

RDFa

No example in this format

microdata

No example in this format

JSON-LD (source lint)

<!-- John asked Steve 'What is 2 + 2?'. -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "AskAction",
  "agent": {
    "@type": "Person",
    "name": "John"
  },
  "recipient": {
    "@type": "Person",
    "name": "Steve"
  },
  "question": {
    "@type": "Question",
    "text": "What's 2 + 2?"
  }
}
</script>

structured

rdf:type schema:AskAction
schema:agent
rdf:type schema:Person
schema:name John
schema:question
rdf:type schema:Question
schema:text What's 2 + 2?
schema:recipient
rdf:type schema:Person
schema:name Steve

Example eg-0100

Without Markup (source lint)

John replied '4' to Steve's question 'What's 2 + 2?'.

RDFa

No example in this format

microdata

No example in this format

JSON-LD (source lint)

<!-- John replied '4' to Steve's question 'What's 2 + 2?'. -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "ReplyAction",
  "agent": {
    "@type": "Person",
    "name": "John"
  },
  "recipient": {
    "@type": "Person",
    "name": "Steve"
  },
  "resultComment": {
    "@type": "Answer",
    "parentItem": {
      "@type": "Question",
      "text":  "What's 2 + 2?"
    },
    "text": "4."
  }
}
</script>

structured

rdf:type schema:ReplyAction
schema:agent
rdf:type schema:Person
schema:name John
schema:recipient
rdf:type schema:Person
schema:name Steve
schema:resultComment
rdf:type schema:Answer
schema:parentItem
rdf:type schema:Question
schema:text What's 2 + 2?
schema:text 4.

Example eg-0186

Without Markup (source lint)

<body>
  <div>
    <h1>What is attr_accessor in Ruby?</h1>
    <div>196</div>
    <div>I am having difficulty understanding Ruby attr_accessors, can someone explain them?</div>
    <div>asked Nov 11 '10 at 20:07</div>
    <div><span>someuser</span></div>
    <div><span>4</span> answers</div>
    <div>
      <div>1337</div>
      <div>
      (The text of the accepted answer goes here...).
      </div>
      <div>answered Dec 1 '10 at 22:01</div>
      <div><span>anotheruser</span></div>
    </div>
    <div>
      <div>vote count: 39</div>
      <div>
        (Another explanation would go here).
      </div>
      <div>answered Dec 6 '10 at 21:11</div>
      <div><span>lonelyuser1234</span></div>
    </div>
  </div>
</body>

RDFa (source lint)

<div vocab="https://schema.org/" typeof="Question">
  <h1 property="name">What is attr_accessor in Ruby?</h1>
  <div property="upvoteCount">196</div>
  <div property="text">I am having difficulty understanding Ruby attr_accessors, can someone explain them?</div>
  <div>asked <time property="dateCreated" datetime="2010-11-04T20:07Z">Nov 11 '10 at 20:07</time></div>
  <div property="author" typeof="Person"><span property="name">someuser</span></div>
  <div><span property="answerCount">4</span> answers</div>
  <div property="suggestedAnswer acceptedAnswer" typeof="Answer">
    <div property="upvoteCount">1337</div>
    <div property="text">
    (The text of the accepted answer goes here...).
    </div>
    <div>answered <time property="dateCreated" datetime="2010-12-01T22:01Z">Dec 1 '10 at 22:01</time></div>
    <div property="author" typeof="Person"><span property="name">anotheruser</span></div>
  </div>
  <div property="suggestedAnswer" typeof="Answer">
    <div property="upvoteCount">39</div>
    <div property="text">
      (Another explanation would go here).
    </div>
    <div>answered <time property="dateCreated" datetime="2010-12-06T21:11Z">Dec 6 '10 at 21:11</time></div>
    <div property="author" typeof="Person"><span property="name">lonelyuser1234</span></div>
  </div>
</div>

microdata (source lint)

<div itemscope itemtype="https://schema.org/Question">
  <h1 itemprop="name">What is attr_accessor in Ruby?</h1>
  <div itemprop="upvoteCount">196</div>
  <div itemprop="text">I am having difficulty understanding Ruby attr_accessors, can someone explain them?</div>
  <div>asked <time itemprop="dateCreated" datetime="2010-11-04T20:07Z">Nov 11 '10 at 20:07</time></div>
  <div itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name">someuser</span></div>
  <div><span itemprop="answerCount">4</span> answers</div>
  <div itemprop="suggestedAnswer acceptedAnswer" itemscope itemtype="https://schema.org/Answer">
    <div itemprop="upvoteCount">1337</div>
    <div itemprop="text">
    (The text of the accepted answer goes here...).
    </div>
    <div>answered <time itemprop="dateCreated" datetime="2010-12-01T22:01Z">Dec 1 '10 at 22:01</time></div>
    <div itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name">anotheruser</span></div>
  </div>
  <div itemprop="suggestedAnswer" itemscope itemtype="https://schema.org/Answer">
    <div itemprop="upvoteCount">39</div>
    <div itemprop="text">
      (Another explanation would go here).
    </div>
    <div>answered <time itemprop="dateCreated" datetime="2010-12-06T21:11Z">Dec 6 '10 at 21:11</time></div>
    <div itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name">lonelyuser1234</span></div>
  </div>
</div>

JSON-LD (source lint)

<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "Question",
    "name": "What is attr_accessor in Ruby?",
    "upvoteCount": "196",
    "text": "I am having difficulty understanding Ruby attr_accessors, can someone explain them?",
    "dateCreated": "2010-11-04T20:07Z",
    "author": {
        "@type": "Person",
        "name": "someuser"
    },
    "answerCount": "4",
    "acceptedAnswer": {
        "@type": "Answer",
        "upvoteCount": "1337",
        "text": "(The text of the accepted answer goes here...).",
        "dateCreated": "2010-12-01T22:01Z",
        "author": {
            "@type": "Person",
            "name": "someuser"
        }
    },
    "suggestedAnswer": {
        "@type": "Answer",
        "upvoteCount": "39",
        "text": "(The text of the accepted answer goes here...).",
        "dateCreated": "2010-12-06T21:11Z",
        "author": {
            "@type": "Person",
            "name": "lonelyuser1234"
        }
    }
}
</script>

structured

rdf:type schema:Question
schema:acceptedAnswer
rdf:type schema:Answer
schema:author
rdf:type schema:Person
schema:name someuser
schema:dateCreated 2010-12-01T22:01Z
schema:text (The text of the accepted answer goes here...).
schema:upvoteCount 1337
schema:answerCount 4
schema:author
rdf:type schema:Person
schema:name someuser
schema:dateCreated 2010-11-04T20:07Z
schema:name What is attr_accessor in Ruby?
schema:suggestedAnswer
rdf:type schema:Answer
schema:author
rdf:type schema:Person
schema:name lonelyuser1234
schema:dateCreated 2010-12-06T21:11Z
schema:text (The text of the accepted answer goes here...).
schema:upvoteCount 39
schema:text I am having difficulty understanding Ruby attr_accessors, can someone explain them?
schema:upvoteCount 196