Learn how to create horizontal frames using the <frameset> tag with the rows attribute to divide the browser window into horizontal sections.
To create an HTML webpage that demonstrates the use of horizontal frames using the <frameset> tag with the rows attribute to divide the browser window into horizontal sections.
Horizontal frames divide the browser window into rows (top to bottom). The rows attribute of the <frameset> tag specifies the height of each frame.
rows="30%, 70%" — Two rows: top (30%) and bottom (70%).rows="20%, 60%, 20%" — Three rows: top (20%), middle (60%), bottom (20%).<frame> tag that loads an HTML document.<frameset> and <frame> tags are deprecated in HTML5. They are still supported by most browsers but are not recommended for new projects. Use CSS Flexbox or CSS Grid instead.
| Layout | Code | Description |
|---|---|---|
| 2 Rows | <frameset rows="50%, 50%"> |
Two equal horizontal sections |
| 3 Rows | <frameset rows="20%, 60%, 20%"> |
Header, Content, Footer |
| 4 Rows | <frameset rows="15%, 15%, 55%, 15%"> |
Header, Nav, Content, Footer |
| Uneven Rows | <frameset rows="100px, *, 100px"> |
Fixed heights with flexible middle |
| Mixed Units | <frameset rows="20%, 60%, *"> |
Top and bottom fixed, middle fills rest |
| Value Type | Description | Example |
|---|---|---|
| Percentage | Percentage of the total window height | rows="20%, 60%, 20%" |
| Pixels | Fixed height in pixels | rows="100, 400, 100" |
| Asterisk (*) | Remaining space (flexible) | rows="100, *, 100" |
| Mixed | Combination of units | rows="20%, 300, *" |
| Mistake | Why It's Wrong | Correct Way |
|---|---|---|
Using <body> with <frameset> |
Invalid HTML structure | Use either <body> or <frameset>, not both |
| Row percentages not adding to 100% | Layout issues | Ensure rows add up to 100% |
Forgetting <noframes> fallback |
Poor accessibility | Always include <noframes> content |
Missing src attribute in <frame> |
Frame will be empty | Always specify src for each frame |
Not closing the <frameset> tag |
Invalid HTML | Always close with </frameset> |
rows attribute.rows can use percentages, pixels, or the * (asterisk) for flexible sizing.<frame> loads a separate HTML document.You have successfully:
<frameset> and <frame> tags.rows attribute with percentages and pixel values.* (asterisk).ایک HTML ویب صفحہ بنانا جو افقی فریموں کے استعمال کو <frameset> ٹیگ کے rows صفت کے ساتھ براؤزر ونڈو کو افقی حصوں میں تقسیم کرنے کا طریقہ ظاہر کرتا ہے۔
افقی فریم براؤزر ونڈو کو قطاروں (اوپر سے نیچے) میں تقسیم کرتے ہیں۔ <frameset> ٹیگ کی rows صفت ہر فریم کی اونچائی کی وضاحت کرتی ہے۔
rows="30%, 70%" — دو قطاریں: اوپر (30%) اور نیچے (70%)۔rows="20%, 60%, 20%" — تین قطاریں: اوپر (20%)، درمیان (60%)، نیچے (20%)۔<frame> ٹیگ ہوتا ہے جو ایک HTML دستاویز لوڈ کرتا ہے۔<frameset> اور <frame> ٹیگز HTML5 میں متروک ہیں۔ وہ زیادہ تر براؤزرز کے ذریعہ اب بھی سپورٹ کیے جاتے ہیں لیکن نئے پروجیکٹس کے لیے تجویز نہیں کیے جاتے۔ اس کی بجائے CSS Flexbox یا CSS Grid استعمال کریں۔
| لے آؤٹ | کوڈ | وضاحت |
|---|---|---|
| 2 قطاریں | <frameset rows="50%, 50%"> |
دو برابر افقی حصے |
| 3 قطاریں | <frameset rows="20%, 60%, 20%"> |
ہیڈر، مواد، فوٹر |
| 4 قطاریں | <frameset rows="15%, 15%, 55%, 15%"> |
ہیڈر، نیویگیشن، مواد، فوٹر |
| غیر مساوی قطاریں | <frameset rows="100px, *, 100px"> |
مقررہ اونچائیاں اور لچکدار درمیان |
| مخلوط اکائیاں | <frameset rows="20%, 60%, *"> |
اوپر اور نیچے مقرر، درمیان باقی بھرتی ہے |
| قدر کی قسم | وضاحت | مثال |
|---|---|---|
| فیصد | کل ونڈو اونچائی کا فیصد | rows="20%, 60%, 20%" |
| پکسلز | پکسلز میں مقررہ اونچائی | rows="100, 400, 100" |
| ستارہ (*) | باقی جگہ (لچکدار) | rows="100, *, 100" |
| مخلوط | اکائیوں کا مجموعہ | rows="20%, 300, *" |
| غلطی | یہ کیوں غلط ہے | صحیح طریقہ |
|---|---|---|
<body> کو <frameset> کے ساتھ استعمال کرنا |
غلط HTML ڈھانچہ | یا تو <body> یا <frameset> استعمال کریں، دونوں نہیں |
| قطار کے فیصد کا 100% تک نہ پہنچنا | لے آؤٹ کے مسائل | یقینی بنائیں کہ قطاریں 100% تک پہنچیں |
<noframes> فال بیک بھول جانا |
ناقص رسائی | ہمیشہ <noframes> مواد شامل کریں |
<frame> میں src صفت غائب |
فریم خالی ہوگا | ہر فریم کے لیے ہمیشہ src مخصوص کریں |
<frameset> ٹیگ بند نہ کرنا |
غلط HTML | ہمیشہ </frameset> کے ساتھ بند کریں |
rows صفت کا استعمال کرتے ہوئے براؤزر ونڈو کو قطاروں میں تقسیم کرتے ہیں۔rows فیصد، پکسلز، یا * (ستارہ) لچکدار سائز کے لیے استعمال کر سکتے ہیں۔<frame> ایک الگ HTML دستاویز لوڈ کرتا ہے۔آپ نے کامیابی سے:
<frameset> اور <frame> ٹیگز کا استعمال کرتے ہوئے افقی فریموں کے ساتھ ایک HTML ویب صفحہ بنایا۔rows صفت کا استعمال کیا۔* (ستارہ) کا استعمال کرتے ہوئے لچکدار سائز کے بارے میں سیکھا۔