تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
استخدام ترميز HTML صالح لتحديد البيانات الوصفية للصفحة
إنّ استخدام ترميز HTML صالح للبيانات الوصفية للصفحة يضمن أن يتمكن محرّك بحث Google من استخدام البيانات الوصفية كما هي موثّقة.
يحاول محرّك بحث Google فهم ترميز HTML حتى لو كان غير صالح أو غير متّسق مع معيار HTML، ولكن يمكن أن تؤدي الأخطاء في الترميز إلى حدوث مشاكل في طريقة استخدام البيانات الوصفية على "بحث Google".
إنّ العنصر <head>
الخاص بمستند HTML هو العنصر الأساسي لتحديد البيانات الوصفية لصفحة معيّنة. إذا استخدمت عنصرًا غير صالح في <head>
، يتجاهل محرّك بحث Google أي عناصر تظهر بعد العنصر غير الصالح.
استخدام عناصر صالحة في العنصر <head>
يجب أن يحتوي العنصر <head>
على العناصر الصالحة التالية فقط (بدون تضمين عناصر أخرى غير صالحة)، وفقًا لمعيار HTML:
title
meta
link
script
style
base
noscript
template
عدم استخدام عناصر غير صالحة في العنصر <head>
لا يسمح معيار HTML في <head>
باستخدام أي عنصر آخر غير العناصر المذكورة أعلاه. في ما يلي عنصران شائعان يظهران في العنصر <head>
ويجعلانه غير صالح:
ننصحك بشدّة بتجنّب استخدام هذين العنصرين غير الصالحين في
العنصر <head>
، ولكن في حال اضطررت إلى استخدامهما، ننصحك بوضعهما بعد العناصر التي
تريد أن يراها محرّك بحث Google. بعد أن يرصد محرّك بحث Google أحد هذين العنصرين غير الصالحين، يفترض أنّه وصل إلى نهاية
العنصر <head>
ويتوقّف عن قراءة أي عناصر لاحقة مدرَجة في العنصر
<head>
.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-04 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-04 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eUtilize valid HTML for page metadata to ensure Google can properly interpret and use it in search results.\u003c/p\u003e\n"],["\u003cp\u003eInclude metadata within the \u003ccode\u003e<head>\u003c/code\u003e element of your HTML document, using only the valid elements specified by the HTML standard: \u003ccode\u003etitle\u003c/code\u003e, \u003ccode\u003emeta\u003c/code\u003e, \u003ccode\u003elink\u003c/code\u003e, \u003ccode\u003escript\u003c/code\u003e, \u003ccode\u003estyle\u003c/code\u003e, \u003ccode\u003ebase\u003c/code\u003e, \u003ccode\u003enoscript\u003c/code\u003e, and \u003ccode\u003etemplate\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAvoid using invalid elements like \u003ccode\u003e<iframe>\u003c/code\u003e and \u003ccode\u003e<img>\u003c/code\u003e within the \u003ccode\u003e<head>\u003c/code\u003e element as this can disrupt Google's parsing and cause metadata to be ignored.\u003c/p\u003e\n"],["\u003cp\u003eIf you must use invalid elements, place them after the valid metadata elements to minimize potential issues.\u003c/p\u003e\n"]]],["Valid HTML is crucial for Google to utilize page metadata correctly. The `\u003chead\u003e` element is key for this; only specific elements (`title`, `meta`, `link`, `script`, `style`, `base`, `noscript`, `template`) are allowed within it. Invalid elements, like `iframe` or `img`, cause Google to ignore any subsequent elements within `\u003chead\u003e`. Avoid invalid elements; if used, place them after valid ones to ensure Google reads the desired metadata first.\n"],null,["# Valid Page Metadata for Google Search | Google Search Central\n\nUse valid HTML to specify page metadata\n=======================================\n\n\nUsing valid HTML for page metadata ensures that Google can use the metadata as documented.\nGoogle tries to understand HTML even when it is invalid or inconsistent with the\n[HTML standard](https://html.spec.whatwg.org/multipage/),\nbut errors in the markup can cause problems with how your metadata is used in Google Search.\nThe primary element for specifying metadata about a page is the `\u003chead\u003e`\nelement of an HTML document. If you use an invalid element in the `\u003chead\u003e` element, Google ignores any\nelements that appear after the invalid element.\n\nUse valid elements in the `\u003chead\u003e` element\n------------------------------------------\n\n\nThe `\u003chead\u003e` element must only contain the following valid elements (and no other invalid elements), as per\nthe HTML standard:\n\n- `title`\n- `meta`\n- `link`\n- `script`\n- `style`\n- `base`\n- `noscript`\n- `template`\n\nDon't use invalid elements in the `\u003chead\u003e` element\n--------------------------------------------------\n\n\nNo element other than the aforementioned is permitted by the HTML standard in the\n`\u003chead\u003e` element. Common elements that appear in the `\u003chead\u003e` element,\nrendering it invalid are:\n\n- `iframe`\n- `img`\n\n\nWe strongly recommend that you don't use these invalid elements in the\n`\u003chead\u003e` element, but if you must, place these invalid elements after the ones you\nwant Google to see. Once Google detects one of these invalid elements, it assumes the end of\nthe `\u003chead\u003e` element and stops reading any further elements in the\n`\u003chead\u003e` element."]]