# 練習題

## 如何新增結構化資料

1. 新增必要屬性。根據您使用的格式，瞭解要在網頁中的什麼位置插入結構化資料
2. 遵循指南規範
3. 使用複合式搜尋結果測試驗證程式碼。
4. 部署幾個包含結構化資料的網頁，並使用網址檢查工具測試 Google 轉譯網頁的情形。請確認 Google 可以存取您的網頁，且網頁並未遭到 robots.txt 檔案或 noindex 標記封鎖，也未設有登入規定。如果網頁看起來沒問題，您可以要求 Google 重新檢索您的網址
5. 為了讓 Google 掌握日後的異動內容，建議您提交 Sitemap。您可以使用 Search Console Sitemap API 自動執行這項操作。

## 範例

### 只包含一道題目的測驗

<html>
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"typicalAgeRange": "7-12",
"educationalAlignment": [
{
"@type": "AlignmentObject",
"alignmentType": "educationalSubject",
"targetName": "Mathematics"
},
{
"@type": "AlignmentObject",
"alignmentType": "educationalSubject",
"targetName": "Algebra"
},
{
"@type": "AlignmentObject",
"alignmentType": "educationalLevel",
"targetName": "Grade 5 » Number and Operations—Fractions » Apply and extend previous understandings of multiplication and division. » 3",
"educationalFramework": "Common Core",
"targetUrl": "http://www.corestandards.org/Math/Content/5/NF/B/3/"
}
],
"@type": "Thing",
"name": "Fractions"
},
"educationalLevel": "intermediate",
"eduQuestionType": "Multiple choice",
"learningResourceType": "Practice problem",
"assesses": "Multiplying fractions by whole numbers",
"name": "Choose the model",
"comment": {
"@type": "Comment",
"text": "This is a hint about the question."
},
"encodingFormat": "text/markdown",
"text": "Which model represents the product $$2 * \\frac{2}{3}$$?",
{
"position": 0,
"encodingFormat": "text/html",
"text": "<img src=\"www.test.com/practice-problems-fractions/…image2.png\" alt=\"Answer 2\" />",
"comment": {
"@type": "Comment",
}
}
],
"position": 1,
"encodingFormat": "text/html",
"text": "<img src=\"www.test.com/practice-problems-fractions/…image1.png\" alt=\"Answer 1\" />",
"comment": {
"@type": "Comment",
},
"@type": "Comment",
"text": "This is a full explanation on how this answer was achieved."
}
}
}
}
</script>
<body>
</body>
</html>

### 只包含一道題目和核取方塊答案選項的測驗

<html>
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Quiz",
"name": "Quiz about laws of physics",
"@type": "Thing",
"name": "Laws of Physics And Applications"
},
"educationalLevel": "intermediate",
"assesses": "Laws of physics",
"hasPart": {
"@type": "Question",
"eduQuestionType": "Checkbox",
"learningResourceType": "Practice problem",
"name": "Laws of Physics And Applications",
"typicalAgeRange": "12-15",
"text": "Identify laws of Physics. (Select all valid answers)",
{
"position": 0,
"comment": {
"@type": "Comment",
"text": "This is a hint"
}
},
{
"position": 2,
"text": "EUA law",
"comment": {
"@type": "Comment",
"text": "This is a hint"
}
}
],
{
"position": 1,
"text": "Newton's law",
"comment": {
"@type": "Comment",
"text": "This is a hint"
},
"@type": "Comment",
"text": "This is a full explanation on how this answer was achieved."
}
},
{
"position": 3,
"text": "Ohm's law",
"comment": {
"@type": "Comment",
"text": "This is a hint"
},
"@type": "Comment",
"text": "This is a full explanation on how this answer was achieved."
}
}
]
}
}
</script>
<body>
</body>
</html>

### 包含多道題目的測驗

<html>
<title>Quiz about displacement, velocity and time</title>
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Quiz",
"typicalAgeRange": "7-12",
"educationalLevel": "intermediate",
"assesses": "Velocity and speed",
"educationalAlignment": [
{
"@type": "AlignmentObject",
"alignmentType": "educationalSubject",
"targetName": "Science"
},
{
"@type": "AlignmentObject",
"alignmentType": "educationalSubject",
"targetName": "Physics"
}
],
"name": "Quiz about displacement, velocity and time",
"@type": "Thing",
"name": "Displacement, velocity, and time"
},
"hasPart": [
{
"@type": "Question",
"eduQuestionType": "Multiple choice",
"learningResourceType": "Practice problem",
"name": "Average velocity and average speed from graphs",
"text": "A bug crawls on a wall. What is the average velocity of the bug between the times $$t = 1s$$ and $$t = 10s$$?",
"comment": {
"@type": "Comment",
"text": "This is a hint about the question."
},
"encodingFormat": "text/markdown",
{
"position": 0,
"encodingFormat": "text/markdown",
"text": "$$0.5 \\frac{m}{s}$$",
"comment": {
"@type": "Comment",
"text": "This is a hint"
}
},
{
"position": 1,
"encodingFormat": "text/markdown",
"text": "$$-0.5 \\frac{m}{s}$$",
"comment": {
"@type": "Comment",
"text": "This is a hint"
}
},
{
"position": 3,
"encodingFormat": "text/markdown",
"text": "$$1.5 \\frac{m}{s}$$",
"comment": {
"@type": "Comment",
"text": "This is a hint"
}
}
],
"position": 2,
"encodingFormat": "text/markdown",
"text": "$$0 \\frac{m}{s}$$",
"comment": {
"@type": "Comment",
"text": "This is a hint"
}
}
},
{
"@type": "Question",
"eduQuestionType": "Multiple choice",
"learningResourceType": "Practice problem",
"name": "Average velocity and average speed from graphs",
"text": "A swimmer motion is shown on the following graph of position x vs. time t. What is the average speed?",
"encodingFormat": "text/markdown",
"comment": {
"@type": "Comment",
"text": "This is a hint about the question."
},
{
"position": 0,
"text": "1",
"encodingFormat": "text/html",
"comment": {
"@type": "Comment",
"text": "This is a hint"
}
},
{
"position": 2,
"text": "3",
"encodingFormat": "text/html",
"comment": {
"@type": "Comment",
"text": "This is a hint"
}
},
{
"position": 3,
"text": "4",
"encodingFormat": "text/html",
"comment": {
"@type": "Comment",
"text": "This is a hint"
}
}
],
"position": 1,
"text": "2",
"encodingFormat": "text/html",
"comment": {
"@type": "Comment",
"text": "This is a hint"
},
"@type": "Comment",
"text": "This is a full explanation on how this answer was achieved."
}
}
}
]
}
</script>
<body>
</body>
</html>

## 指南規範

### 技術指南

• 請盡可能將結構化資料放在資訊最為詳細的分葉頁面，不要放在沒有練習題的網頁上。
• 請針對您想突顯複合式搜尋結果的練習題加上 Quiz 屬性。 結構化資料必須位於供使用者與練習題互動的網頁上。
• 您的網頁須包含所有必要的結構化資料屬性
• 每個主題至少要標記兩個練習題；例如，「二次方程式」這個概念要有兩個練習題。請著重標記想用練習題複合式搜尋結果呈現的概念和問題。這些內容可位於不同網頁上。
• 使用者必須要能順利存取您網站中的練習題；也就是說，練習題不能存放在資料檔或 PDF 檔中。
• 確認您的主機負載設定允許經常進行檢索
• 如果您的網站上有多個網址代管同一個練習題，請針對每個網頁使用標準網址
• 如果練習題為純文字：
• 題目的長度上限為 320 個半形字元。
• 每個答案選項的長度上限為 70 個半形字元。
• 如果練習題同時包含文字和圖片：
• 題目的長度上限為 160 個半形字元。
• 圖片的高度不得超過 200 像素。
• 不實陳述或行為：我們嚴禁蓄意欺騙或誤導使用者的練習題，這包括誤將問題標記為無關的主題。

### 內容指南

#### 品質

• 透過這項功能呈現練習題內容時，您有責任確保內容正確無誤且品質優良。如果我們根據品質審查程序，發現您資料中的錯誤達到一定數量，可能會依照嚴重程度移除您所有或部分練習題，直到問題解決。這項規範在於確保達到下列要求：
• 所標記的概念與題目相關
• 題目、答案選項、提示和解答說明的格式與內容正確
• 答案順序正確 (例如「以上皆非」不能放在第一個選項)
• 圖片或公式與問題正確相關，且符合品質要求
• 正確呈現數學符號並採用定義符

## 標記教育標準

• 州際共同核心標準 (Common Core State Standards)
• 德州基本知識與技能 (Texas Essential Knowledge and Skills，TEKS)
• 維吉尼亞州學習標準 (Virginia Standards of Learning，SOL)
• 卑詩省表現標準 (BC Performance Standards)
• 亞伯達省課程計畫 (Alberta Programs of Studies)
• 澳洲中小學統一課程綱要 (The Australian Curriculum，由 ACARA 制定)
• 維多利亞州課程綱要 (F-10)
• 英國國定課程 (UK National Curriculum)

## 結構化資料類型定義

### Quiz

Quiz 是一組練習題 (可以為一或多題)，通常關於相同的概念或題目。

schema.org 內提供 Quiz 的完整定義。

about Thing


{
"@type": "Quiz",
"@type": "Thing"
}
}
about.name Text


{
"@type": "Quiz",
"@type": "Thing",
"name": "Fractions"
}
}
hasPart Question


{
"@type": "Quiz",
"hasPart": {
"@type": "Question"
}
}
hasPart.acceptedAnswer Answer


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
}
}
}
hasPart.eduQuestionType Text

• Multiple choice：只有一個正確答案。系統會以一組圓形按鈕顯示所有選項，而使用者只能選取其中之一。
• Checkbox：有多個正確答案。系統會以一組核取方塊顯示所有選項，使用者可以勾選所有符合的答案。

{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"eduQuestionType": "Multiple choice"
}
}
hasPart.learningResourceType Text


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"learningResourceType": "Practice problem"
}
}
hasPart.suggestedAnswer Answer


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
}
}
}
hasPart.suggestedAnswer.text Text


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"text": "$$x = 1$$"
}
}
}
hasPart.text Text


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"text": "Which diagram represents the product $$3 *\frac{2}{3}$$?"
}
}

educationalAlignment AlignmentObject


{
"@type": "Quiz",
"educationalAlignment": []
}
educationalAlignment.alignmentType Text

• 如要指定測驗的研究領域，請將 alignmentType 設為 educationalSubject
• 如要指定測驗的目標年級或教育標準，請將 alignmentType 設為 educationalLevel


{
"@type": "Quiz",
"educationalAlignment": [
{
"@type": "AlignmentObject",
"alignmentType": "educationalSubject",
"targetName": "Mathematics"
},
{
"@type": "AlignmentObject",
"alignmentType": "educationalLevel",
}
]
}


{
"@type": "Quiz",
"educationalAlignment: [
{
"@type": "AlignmentObject",
"alignmentType": "educationalLevel",
"educationalFramework": "Common Core",
"targetName": "Grade 8: Expressions and Equations",
"targetUrl": "http://www.corestandards.org/Math/Content/8/EE/A/2/"
}
]
}
educationalAlignment.educationalFramework Text

educationalAlignment.targetName Text


{
"@type": "Quiz",
"educationalAlignment: [
{
"@type": "AlignmentObject",
"targetName": "Grade 8: Expressions and Equations"
}
]
}
educationalAlignment.targetUrl URL


{
"@type": "Quiz",
"educationalAlignment: [
{
"@type": "AlignmentObject",
"targetUrl": "http://www.corestandards.org/Math/Content/8/EE/A/2/"
}
]
}
educationalLevel Text

• beginner
• intermediate
• advanced

{
"@type": "Quiz",
"educationalLevel": "beginner"
}
hasPart.about Thing


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"@type": "Thing"
}
}
}

hasPart.about.name Text


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"@type": "Thing",
"name": "Fractions"
}
}
}

hasPart.acceptedAnswer.answerExplanation Comment


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"@type": "Comment"
}
}
}
}

hasPart.acceptedAnswer.answerExplanation.text Text


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"@type": "Comment",
"text": "*In order to get to this result..*",
"encodingFormat": "text/markdown"
}
}
}
}
hasPart.acceptedAnswer.comment Comment


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"comment": {
"@type": "Comment"
}
}
}
}
hasPart.acceptedAnswer.comment.text Text


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"comment": {
"@type": "Comment",
"text": "<p>This is a hint</p>"
}
}
}
}
hasPart.acceptedAnswer.position Integer


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"position": "2"
}
}
}
hasPart.assesses DefinedTermText


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"assesses": "Multiplying fractions by whole numbers"
}
}
hasPart.comment Comment


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"comment": {
"@type": "Comment"
}
}
}
hasPart.comment.text Text


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"comment": {
"@type": "Comment",
"text": "<p>This is a hint</p>"
}
}
}

hasPart.educationalAlignment AlignmentObject


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"educationalAlignment": []
}
hasPart.educationalAlignment.alignmentType Text

• 如要指定題目的研究領域，請將 alignmentType 設為 educationalSubject
• 如要指定題目的目標年級或教育標準，請將 alignmentType 設為 educationalLevel


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"educationalAlignment": [
{
"@type": "AlignmentObject",
"alignmentType": "educationalSubject",
"targetName": "Mathematics"
},
{
"@type": "AlignmentObject",
"alignmentType": "educationalLevel",
}
]
}
}


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"educationalAlignment: [
{
"@type": "AlignmentObject",
"alignmentType": "educationalLevel",
"educationalFramework": "Common Core",
"targetName": "Grade 8: Expressions and Equations",
"targetUrl": "http://www.corestandards.org/Math/Content/8/EE/A/2/"
}
]
}
}
hasPart.educationalAlignment.educationalFramework Text

hasPart.educationalAlignment.targetName Text


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"educationalAlignment: [
{
"@type": "AlignmentObject",
"alignmentType": "educationalLevel",
"targetName": "Grade 8: Expressions and Equations"
}
]
}
}
hasPart.educationalAlignment.targetUrl URL

hasPart.educationalLevel Text

• beginner
• intermediate
• advanced

{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"educationalLevel": "beginner"
}
}
hasPart.name Text


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
}
}
hasPart.suggestedAnswer.comment Comment


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"comment": {
"@type": "Comment"
}
}
}
}
hasPart.suggestedAnswer.comment.text Text


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"comment": {
"@type": "Comment",
"text": "<p>This is a hint</p>"
}
}
}
}
hasPart.suggestedAnswer.encodingFormat Text

• text/markdown
• text/html

{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"encodingFormat": "text/html"
}
}
}
hasPart.suggestedAnswer.position Integer


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"position": "0"
}
}
}
hasPart.typicalAgeRange Text


{
"@type": "Quiz",
"hasPart": {
"@type": "Question",
"typicalAgeRange": "7-12"
}
}
name Text


{
"@type": "Quiz",
"name": "Negative exponents review"
}
typicalAgeRange Text


{
"@type": "Quiz",
"typicalAgeRange": "7-12"
}

## 在 HTML 或 Markdown 編碼中撰寫練習題

Google 搜尋支援使用 Markdown (CommonMark 的變種版本) 和 HTML 來對 QuestionAnswerComment 進行編碼。我們將編碼使用的結構元素限制如下：

• 標頭
• 換行符號
• 清單 (排序和未排序)
• 段落
• 粗體
• 斜體
• 圖片
• LaTex 中的公式

### 如何指定格式

{
"@type": "Question",
"name": "Average velocity and average speed from graphs",
"text": "What is the average velocity [..] between the times $$t = 4s$$ and $$t = 10s$$?",
"encodingFormat": "text/markdown"
..
..
}

[]
[]