English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

دليل مرجع HTML

جميع علامات HTML

HTML: <frame> علامة

<frame> هو عنصر HTML يحدد منطقة معينة يمكن عرض وثيقة HTML أخرى فيها. يجب استخدام <frame> في <frameset>. لا يجب الترويج لاستخدام <frame> بسبب بعض العيوب مثل مشاكل الأداء، وكذلك نقص قابلية الوصول للمستخدمين الذين يستخدمون محولات الشاشة. يجب الترويج لـ <iframe> أكثر من <frame>.

Online example

A simple three-frame page:

<!DOCTYPE html>
<html>
<frameset cols="25%,*,25%">
  <frame src="sun.html">
  <frame src="venus.html">
  <frame src="mercur.html">
</frameset>
</html>
Test to see

Browser compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support the <frame> tag.

Definition and usage instructions

HTML5 does not support the <frame> tag.

The <frame> tag defines the child windows (frames) within <frameset>.

Each <frame> within <frameset> can be set with different attributes, such as border, scrolling, noresize, etc.

Note:If you want to validate a page that contains frames, make sure <!DOCTYPE> Set to "HTML Frameset DTD" or "XHTML Frameset DTD".

Differences between HTML 4.01 and HTML5

HTML5 does not support the <frame> tag, HTML 4.01 supports the <frame> tag.

Differences between HTML and XHTML

In HTML, the <frame> tag does not have a closing tag. In XHTML, the <frame> tag must be closed correctly.

Optional attribute

الخصائصالقيمةالوصف
frameborder0
 1
HTML5 does not support. Specifies whether a border is displayed around the frame.
longdescURLHTML5 does not support. Specifies a page that contains a long description of the content of the frame.
marginheightpixelsHTML5 does not support. Specifies the top and bottom margins of the frame.
marginwidthpixelsHTML5 does not support. Specifies the left and right margins of the frame.
namenameHTML5 does not support. Specifies the name of the frame.
noresizenoresizeHTML5 does not support. Specifies that the size of the frame cannot be adjusted.
scrollingyes
 no
 auto
HTML5 does not support. Specifies whether a scrollbar is displayed in the frame.
srcURLHTML5 does not support. Specifies the URL of the document to be displayed in the frame.

خصائص المعيار

يدعم علامة <frame> في HTML 4.01 الميزات المعيارية التالية:

الخصائصالقيمةالوصف
classclassnameتحديد اسم الفئة للمعلمات
ididتحديد id الفريد للمعلمات
stylestyle_definitionتحديد النمط الداخلي للمعلمات
titletextتحديد معلومات إضافية للمعلمات

للحصول على وصف كامل، يرجى زيارةخصائص المعيار.

خصائص الحدث

وفقاً لمواصفات W3C، في HTML 4.01، لا يدعم علامة <frame> أي خصائص أحداث.

لكن جميع المتصفحات تدعم الحدث onload.

للحصول على وصف كامل، يرجى زيارةخصائص الحدث.

تجربة المثال عبر الإنترنت

الصندوق الأفقي
هذا المثال يوضح كيفية إعداد هيكل أفقي باستخدام ثلاثة مستندات مختلفة.

هيكل المزيج
هذا المثال يوضح كيفية إنشاء هيكل من ثلاثة مستندات، ودمجهم في الصف والعمود.

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