Frames

Introduction

जब हम एक ही browser window को कई हिस्सों (sections) में बांटकर अलग-अलग web pages एक साथ दिखाना चाहते हैं, तो Frames का उपयोग किया जाता है।

सोचिए—अगर आपको एक ही screen पर menu, content और header अलग-अलग दिखाने हों, तो आप क्या करेंगे?

यहीं पर HTML Frames काम आते हैं। यह browser window को multiple parts में divide करके हर हिस्से में अलग-अलग page दिखाने की सुविधा देते हैं।

हालांकि modern web designing में Frames का उपयोग कम हो गया है, लेकिन exam और basic concepts के लिए इसे समझना जरूरी है।

Definition

HTML Frames एक technique है जिसके द्वारा browser window को कई हिस्सों में divide किया जाता है, और हर हिस्से में अलग-अलग HTML document display किया जाता है।

Concept

1. Frameset Tag क्या होता है

Frames बनाने के लिए <frameset> tag का उपयोग किया जाता था।

यह <body> tag की जगह use होता है और window को rows या columns में divide करता है।

2. Frame Tag क्या होता है

हर section में page दिखाने के लिए <frame> tag use होता है।

इसमें src attribute होता है, जो file का path बताता है।

3. Basic Syntax

<frameset cols="30%,70%">
<frame src="menu.html">
<frame src="content.html">
</frameset>Give feedback

Output:
Screen दो हिस्सों में बंट जाएगी—
Left side में menu.html और right side में content.html दिखाई देगा।

4. Rows में Frames

<frameset rows="50%,50%">
<frame src="top.html">
<frame src="bottom.html">
</frameset>Give feedback

Output:
Screen ऊपर और नीचे दो भागों में बंट जाएगी।

5. Nested Frames

Frames के अंदर और frames बनाए जा सकते हैं।

<frameset rows="30%,70%">
<frame src="header.html">
<frameset cols="30%,70%">
<frame src="menu.html">
<frame src="content.html">
</frameset>
</frameset>Give feedback

Output:
Top में header और नीचे left में menu और right में content दिखाई देगा।

6. Important Attributes

  • rows → horizontal division
  • cols → vertical division
  • src → page का path
  • noresize → frame resize न हो
  • scrolling → scrollbar control

7. Limitations of Frames

Frames SEO friendly नहीं होते
Navigation में दिक्कत होती है
Mobile devices पर सही से काम नहीं करते
Modern HTML में इन्हें avoid किया जाता है

8. Modern Alternative

आजकल Frames की जगह <iframe> का उपयोग किया जाता है।

<iframe src="page.html" width="500" height="300"></iframe>Give feedback

Output:
Page के अंदर एक छोटा frame दिखाई देगा जिसमें दूसरा page load होगा।

Real-Life Example

मान लीजिए एक website है जिसमें:

Top में header
Left में menu
Right में content

Frames का उपयोग करके इन सभी को एक साथ अलग-अलग sections में दिखाया जा सकता था।

Important Points

Frames window को divide करते हैं
<frameset> और <frame> का उपयोग होता है
Rows और columns से layout बनता है
Nested frames भी बना सकते हैं
Modern HTML में <iframe> use होता है
Frames अब outdated हो चुके हैं

निष्कर्ष

HTML Frames एक पुरानी लेकिन महत्वपूर्ण technique है, जो browser window को multiple parts में divide करके अलग-अलग content दिखाने की सुविधा देती है। हालांकि आजकल इसका उपयोग कम हो गया है, फिर भी basic understanding के लिए इसे सीखना जरूरी है।

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top