१७. HTML Iframe in Hindi, display another web page in a web page - Hindi

HTML and CSS through Hindi, HTML and CSS Lessons
HTML and CSS tutorial for beginners in Hindi

हेलो फ्रेंड्स, KTL के HTML और CSS tutorial में आपका स्वागत है। आज हम लेसन १७ सीखेंगे।

पिछले लेसन में हमने वेब पेज में टेबल डिस्प्ले करना सीखा।


आज हम <iframe> के बारे में सीखेंगे।

HTML iframe tag in Hindi

<iframe> tag एक वेब पेज में दूसरा वेब पेज embed करता है। इससे हम हमारे वेब पेज में दूसरा वेब पेज दिखा सकते हैं। <iframe> का मतलब होता है - inline frame.

इस का syntax


<iframe src=“urlname of web page to be embeded" width="500" height="300" ></iframe>


होता है।


<iframe> tag के attributes होते हैं - "src", "width"और "height"। हमें यह सब attributes मालूम है। "src" attribute जिस वेब पेज embed करने का है उसका नाम देने के लिये होता है। width और height यह बताते है की डिस्प्ले किये हुवे वेब पेज की width और height कितनी होनी चाहिए।


हम <iframe> का उपयोग करके स्किप्ट लिखेंगे।


एक नयी Notepad फाइल ओपन कीजिये। इस में lesson-16 का पहले लाइन से <body> तक टेक्सट कॉपी कीजिये।


<h3> tag लिखिये और यह टेक्सट लिखिये।


<h3>

In this lesson we have have learned how to embed another web page in our web page. We have embedded our web page from lesson-09. We have shown it in two different sizes to get more clear idea.

</h3>

इसके नीचे यह कोडिंग कीजिये।


<iframe src= "Lesson-09-Inserting images.html" height=500 width=700>

</iframe>
<iframe src= "Lesson-09-Inserting images.html" height=400 width=300>


इस में हम ने lesson-09.html को एम्बेड किया है। हम ने "Lesson09.html" को  "Lesson-09-Inserting images.html" के नाम से rename किया है। यह केवल हमारे convenience के लिए किया है। इससे <iframe> का concept नहीं बदलता है।  इस फाइल को "Lesson-17" और "Lesson-17.html" के नाम से save कीजिये। नीचे आकृती देखिये। Source कोड की PDF फाइल देखने के लिए आकृति १७-१. पर क्लिक कीजिये।


HTML iframe tag in Hindi, display another page in a web page in Hindi
आकृति १७-१ HTML iframe tag, display another page in a web page

आउटपुट देखिये। Lesson-09 का आउटपुट पेज हमारे Lesson-17 के पेज में एम्बेड हुआ है।


HTML iframe  in Hindi, display another web page in a web page
आकृति १७-२ HTML iframe, display anther web page in a web page

हम ने यह दो बार अलग अलग width और height में डिस्प्ले किया है ताकि ठीक से समझ में आ जाये।

यहाँ ध्यान दीजिये: हमारे lesson-17 और lesson-09 एक ही folder में हैं, इसलिए हम ने केवल "lesson-09.html" लिखा है। अगर "Lesson-09.html" किसी दूसरे फोल्डर में होगी तो हमें path देना पडेगा। अगर हम को दूसरे किसी वेब साइट का पेज एम्बेड करना है तो उस पेज का url देना पडेगा।

Important Points:

१. <iframe> का उपयोग एक वेब पेज में कोई दूसरा वेब पगे दिखाने के लिए होता है।
२. "src" attribute में जो वेब पेज एम्बेड करना है उसका नाम देते है। इस में हम एक url दे सकते हैं।
३. कभी भी "width" और "height" देना चाहिए। इससे browser में वेब पेज ठीक से डिस्प्ले होता है।

लेसन १६                                  लेसन १८