Skillpedia
المواقع والواجهات (frontend)75k · #2935

meta-in-body

ما الذي تفعله

تتحقق هذه المهارة من أن وسوم meta، مثل noindex وcanonical والوصف وviewport، موجودة داخل head الصفحة. وهي موجهة إلى بناة الويب الذين يريدون أن تقرأها محركات البحث والمتصفحات.

متى تستخدمها

  • ✓عندما تطلب من الوكيل فحص البنية البرمجية لصفحة بحثًا عن وسوم في غير مكانها.
  • ✓عندما قد تكون إضافة أو سكربت قد أدخل وسوم meta في الجسم، وتبدو توجيهات البحث غير معمول بها.
  • ✓عندما تُفهرس صفحة أو تُستبعد دون سبب، وتحتاج إلى التأكد من أن توجيهات meta في مكانها الصحيح.

رابط المهارة

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/meta-in-body/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/meta-in-body/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“بعض وسوم meta في صفحتي قد تكون في المكان الخطأ. هل تستطيع فحصها وإصلاحها؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يحلل الوكيل الصفحة ويبحث عن عناصر meta داخل الجسم أو بعد إغلاق head. ثم ينقلها إلى head، أو يغيّر السكربت الذي يضيفها بحيث يستهدف head.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Meta Tags in Body

Meta tags placed in the document body are ignored by search engines and most browsers—directives like noindex or canonical-url are silently ineffective, causing pages to be indexed or de-indexed unexpectedly.

Quick Reference

  • All <meta> tags must appear inside <head>, never inside <body>
  • Browsers may ignore or move misplaced meta tags, making them ineffective
  • Crawlers like Googlebot only process meta tags found in <head>
  • Validate with HTML validator or inspect parsed DOM to confirm placement

Check

Parse the HTML and check whether any <meta> elements appear outside <head>—i.e., inside <body> or after the </head> closing tag. Flag each misplaced tag by name/property.

Fix

Move all <meta> tags into the <head> section before </head>. If they are injected by a script after the DOM is built, refactor the injection to target document.head instead of document.body.

Explain

Meta tags are document-level metadata and must live in <head>. When placed in <body>, they fall outside the metadata model of the document—search engines and browsers do not honour them, so directives like noindex or canonical-url will have no effect.

Code Review

Parse the rendered HTML and check the DOM structure. Find all <meta> elements. For each one, traverse up the parent chain — if any ancestor is <body> or if the element appears after </head> in the source, flag it. Pay special attention to: meta name='robots', meta name='description', meta property='og:*', and link rel='canonical' placed in body.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/seo/meta-in-body

الأسئلة الشائعة

لماذا تهم وسوم meta في غير مكانها؟

قد تتجاهلها محركات البحث والمتصفحات، فتبقى توجيهات مثل noindex أو canonical دون أثر.

ماذا لو كان سكربت يضيف الوسوم؟

تقترح المهارة تعديل السكربت ليضيفها إلى head الوثيقة بدلًا من الجسم.

كيف أتحقق من موضعها؟

تقترح المهارة مدقق HTML أو فحص بنية الصفحة بعد تحليلها.

التفاصيل

الوصف الأصلي من المؤلف

Use when auditing HTML document structure. Applies to any page where meta tags (noindex, canonical-url, description, viewport, OG tags) may have been injected into the body by CMS plugins, widgets, or JavaScript rendering.

repo: thedaviddias/Front-End-Checklist

الشعبية

نجوم GitHub
75k
الترتيب
#2935
الترخيص
MIT
آخر تحديث
31‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة