know yourselves. information, computer, 7 wonders, various.

Monday, April 18, 2016

HTML Part 028_Part 027_HTML এর Layout, Table ব্যবহারে Layout




HTML এর Layout
HTML Layout হচ্ছে সবচেয়ে গুরুত্বপূর্ণ বিষয়। Layout দ্বারা Header, Footer থাকবে কিনা, থাকলে কিভাবে? মূল Content কোন দিকে থাকবে, ২দিকে Sidebar থা্কবে কিনা, থাকলে সাইজ কি হবে। Header বা Banner এর নিচে মেনু থাকবে কিনা ইত্যাদি নির্ধারন করে দেওয়া যায়। আধুনিক (HTML-5) Layout কে সাধারণত ২টি ট্যাগের মাধ্যমে করা হয় একটি হচ্ছে Table এবং অপরটি হচ্ছে Div ট্যাগ। তবে Div ট্যাগটি অধিক জনপ্রিয় এবং কার্যকর। এছাড়াও Element এর পজিশন ঠিক করার জন্য Background তৈরী এবং কালারফুল পেজ তৈরী করার জন্য CSS কেও ব্যবহার করা হয়। Table এলিমেন্ট দ্বারা Tabular Data কে প্রদর্শন করা যাবে। কিন্তু Div দ্বারা HTML এলিমেন্টের মধ্যে গ্রুপ তৈরী করে একটি এলিমেন্টের মধ্যে প্রদর্শন করবে এবং কর্ণারগুলোকে রাউন্ড করা যাবে।  আপাতত আমরা Table এলিমেন্ট ব্যবহার করে Layout তৈরী করবো। একটু পরে Div তৈরী করে Layout করবো এবং শেষে Div Div এর মধ্যে আবার Table এলিমেন্টের ব্যবহার করে Layout তৈরী করবো।

Table ব্যবহারে Layout
এখন আমরা টেবিল ব্যবহার করে একটি HTML Layout তৈরী করবো। এখন থেকেই শুরু করবো আমরা Professional Template তৈরীর কাজ ভবিষ্যতেই এটিই হবে Joomla বা Wordpress বা অন্য CMS এর জন্য একটি আদর্শ Professional Template সহায়তা করবে Outsourcing-এ Freelancer হিসাবে কাজ করার জন্য।
আমরা Layout টি কয়েকটি ধাপে ধীরে ধীরে Develop করবো। টেবিলটির ফরম্যাট হবে নিম্নরূপ:


এই টেবিলে (Table) আমরা ৪টি (tr) ও ৩টি কলাম (td) ব্যবহার করবো। অবশ্য এখানে প্রথম ২টি এবং শেষের ১টি Row (tr) তে মাত্র একটি করে Column (td)  ব্যবহার করা হবে। প্রথম ২টি ও শেষের ১টি Row (tr) Colspam ব্যবহার করবো এবং দ্বিতীয় Row (tr) তে ৩টি কলাম ব্যবহার করার কারনে ৩টি কলাম অর্থ্যাৎ tr এ তিনটি td ব্যবহার করা যেতে পারে।
 (Special Program)
notepade++  নিচেরমত  কোডিংসহ একটি HTML ফাইল তৈরী করুন  এবং  Program096  নামে সেভ করুন।
<!DOCTYPE html>
<html>
<head>
<title> example of Layout </title>
</head>
<body>

<table  border="1">
<tr> <td> Nova Computer </td> <td> Nova Computer </td> <td> Nova Computer </td> </tr>

<tr> <td> menu</td>  <td> menu</td> <td> menu</td> </tr>

<tr><td> left Side Bar </td> <td> Main Content  </td>
<td>Right Side Bar </td> </tr>

<tr> <td> Footer </td> <td> Footer </td> <td> Footer</td> </tr>
</table>

</body>
</html>

ব্রাউজার দিযে খুললে নিন্মেক্ত ফলাফল পাওয়া যাবে।
এখন আমরা প্রথম ২টি ও শেষের ১টি Row (tr) Colspam ব্যবহার করবো, অতিরিক্ত (td) মুছে দেবো। টেবিলের tr এর মধ্যে অবস্থিত td এর Style background-color ব্যবহার করবো। Textকে Center Align করবো। সবচেয়ে বড় কথা হলো Table এর width নির্ধারন করে দেবো, আপাতত 500Px এবং আপাতত Height নির্ধারন করবো না। কারন Content যত বড় হবে নিচের দিকে বাড়তে থাকবে। border 0 করে দেবো এবং তৃতীয় Row (tr) এ যেহেতু ৩টি Column (td) ব্যবহার করবো। সেজন্য Left Side Bar এর জন্য, width=100Px, Main Content এর জন্য width 300px এবং Right Side Bar এর জন্য width 100px নির্ধারন করবো।
notepade++  নিচেরমত  কোডিংসহ একটি HTML ফাইল তৈরী করুন এবং সেভ করুন।
<!DOCTYPE html>
<html>
<head>
<title> example of Layout2 </title>
</head>
<body>

<table  width="500" border="0">
<tr> <td colspan="3" style="background-color:#0099FF;text-align:center;"> Nova Computer </td>
</tr>

<tr> <td colspan="3"  style="background-color:#9999FF;"> menu Home Books Tutorials
About Us Contact Us </td> </tr>

<tr> <td style="background-color:#00CCFF; width:100px"> left Side Bar </td>
<td style="background-color:#CCFFFF; width:300px;"> Main Content  </td>
<td style="background-color:#00CCFF;width:100px">Right Side Bar </td> </tr>

<tr> <td colspan="3" style="background-color:#CCCCFF;text-align:center;"> Footer</td> </tr>
</table>
</body>
</html>
ব্রাউজার দিযে খুললে নিন্মেক্ত ফলাফল পাওয়া যাবে।
চলুন প্রোগ্রামটি আরও একটু Develop করি। দেখুন আপনার তৈরী করা কি সুন্দর Webpage layout
notepade++  নিচেরমত  কোডিংসহ একটি HTML ফাইল তৈরী করুন এবং সেভ করুন।
<!DOCTYPE html>
<html>
<head>
<title> example of Layout2 </title>
</head>
<body>
<table  width="500" border="0">
<tr> <td colspan="3" style="background-color:#0099FF;text-align:center;">
<h1>Nova Computer</h1></td> </tr>

<tr> <td colspan="3"  style="background-color:#9999FF;">
Home &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Books &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Tutorials &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
About Us &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Contact Us &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </td> </tr>
<tr> <td style="background-color:#00CCFF; width:100px"> left Side Bar </td>
<td style="background-color:#CCFFFF; width:300px;">
Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content.    </td>
<td style="background-color:#00CCFF;width:100px">Right Side Bar </td> </tr>
<tr> <td colspan="3" style="background-color:#CCCCFF;text-align:center;">  
Copyright © bappi ashraf.com </td> </td> </tr>
</table>
</body>
</html>
ব্রাউজার দিযে খুললে নিন্মেক্ত ফলাফল পাওয়া যাবে।
চলুন আরও একটু develop করি
notepade++  নিচেরমত  কোডিংসহ একটি HTML ফাইল তৈরী করুন এবং সেভ করুন ।
<!DOCTYPE html>
<html>
<head>
<title> example of Layout4 </title>
</head>
<body>
<table  width="500" border="0">
<tr> <td colspan="3" style="background-color:#0099FF;text-align:center;">  <h1>Nova Computer</h1></td>
</tr>
<tr> <td colspan="3"  style="background-color:#9999FF;"> Home &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Books &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Tutorials &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;About Us &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Contact Us &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td> </tr>
<tr>
<td style="background-color:#00CCFF; width:100px">
<b><b>LINK</b><br />
Link1<br />
Link2<br />
Link3 </td>
<td style="background-color:#CCFFFF; width:300px;">
Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content. Title and Content.    </td>



<td style="background-color:#00CCFF;width:100px">
Adsence</b> <br />
Add1<br />
Add2<br />
Add3 </td>
</tr>

<tr>
<td colspan="3" style="background-color:#CCCCFF;text-align:center;">
Copyright © bappi ashraf.com</td></td>
</tr>
</table>

</body>
</html>
ব্রাউজার দিযে খুললে নিন্মেক্ত ফলাফল পাওয়া যাবে।

Previous Post                                                                                           Next Post

  বিস্তারিত জানতে নিচের বইটি সংগরহ করে নিন।

Book Name: Mastering Microsoft  Word
Writer: Bappi Ashraf
Published By: Gyankosh Prokashani
Amount of Pages: 464
First Publish: October-2004
Last Edition: We've February-2015 edition. Future edition may be existed!
Book Price: BDT 350 (30% Discount)
 The writer of this book has told that he has written this book with the concept of "teach yourself". On the other hand, Web Design is a thing which is interesting to learn. He has also told that the book is full of fan and enjoyment so that a person can learn Web Design by himself by playing with the example projects of this book.  Book's CD Link below... 

 cd

RELATED POST LINKS BELOW ********************************************

HTML Part 027_ Colspan, Rowspan, Cell Padding





Colspan
এই এট্রিবিউট দ্বারা কলামের বিস্তৃতি বাড়ানো যায় অর্থাৎ Text কে দুই/তিন ইত্যাদি কলাম পযর্ন্ত বাড়ানো যায়।
Colspan=0 দ্বারা Column Group এর ক্ষেত্রে Cell কে Spam করে শেষ কলাম পর্যমত্ম নিয়ে থাকে। তবে শুধুমাত্র Firefox ব্রাউজার এটি দেখাবে পারে। এই অ্যাট্রিবিউটর ফরম্যাট হচ্ছে <td colspan=“number”>
নিচের কোডিংসহ একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<head>
<title> example of colspan </title>
</head>

<body>
<table border="5" width="100%" height="50px" rules="all">
<tr> <th>Name</th> <th>Title</th> <th>Salary</th> </tr>
<tr> <td>Sopnow</td> <td>Officer</td> <td>15000</td> </tr>
<tr> <td>Mebin</td> <td>Faculty</td> <td>20000</td> </tr>
<tr align="left" bgcolor = pink>
<td align="right" colspan="2">Total Salary is = </td>
<td>35000</td></tr>
</table>
</body>
</html>
ব্রাউজার দিযে খুললে নিন্মেক্ত ফলাফল পাওয়া যাবে।
Rowspan
COLSPAN এর মত ROWSPAN দ্বারা রো বা সারির বিস্তৃতি বাড়ানো যায়। অর্থাৎ Text কে দুই/তিন ইত্যাদি সারি পযর্ন্ত বাড়ানো যায়।
rowspam=0 দ্বারা <thead>, <tbody>, <tfoot> এর শেষ রো পর্যমত্ম নিয়ে থাকে। তবে এটি শুধুমাত্র  Firefox Opera ব্রাউজার সাপোর্ট করে। এই অ্যাট্রিবিউটর ফরম্যাট হচ্ছে <td rowspam=“number”>
নিচের কোডিংসহ একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<body>
<table border="5" width="100%" height="50px" >
<tr> <th>Name</th> <th>Title</th> <th>Salary</th> <th>Total</th> </tr>
<tr> <td>Sopnow</td> <td>Officer</td> <td >15000</td> <td rowspan="2">35000</td></tr>
<tr> <td>Mebin</td> <td>Faculty</td> <td>20000</td> </tr>
</table>
</body>
</html>
ব্রাউজার দিযে খুললে নিন্মেক্ত ফলাফল পাওয়া যাবে।
Cell Spacing Attribute
টেবিল এলিমেন্টে এই অ্যাট্রিবিউটের মাধ্যমে এক সেল থেকে অন্য সেলের মধ্যকার ফাঁকা জায়গা নির্ধারন করে দিতে পারেন। পিক্সেল অনুপাতে এই সংখ্যা নির্ধারন করে দেওয়া যায়। ফরম্যাট হচ্ছে :
         <table cellspacing="number">
নিচের কোডিংসহ একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<head>
<title> example of cellspacing</title>
</head>
<body>
This is no cellspacing
<table border="1">
<tr>
<td>nova1</td> <td>nova2</td> <td>nova3</td> <td>nova4</td>
</tr>
</table> <br />
This is cellspacing="0"
<table border="1" cellspacing ="0">
<tr>
<td>nova1</td> <td>nova2</td> <td>nova3</td> <td>nova4</td>
</tr>
</table> <br />
This is cellspacing="15"
<table border="1" cellspacing ="25">
<tr>
<td>nova1</td> <td>nova2</td> <td>nova3</td> <td>nova4</td>
</tr>
</table>
</body>
</html>
ব্রাউজার দিযে খুললে নিন্মেক্ত ফলাফল পাওয়া যাবে।

Cell Padding
আমরা ইতিমধ্যেই Cell spacing দ্বারা এক সেল থেকে অন্য সেলের দূরত্ত্ব নির্ধারন করেছি। Cell Padding দ্বারা Cell এর মধ্যে Cell এর বর্ডার থেকে  Text বা Content এর দূরত্ত্ব কত হবে সেটি নির্ধারন করে দেওয়া যায়। এক্ষেত্রে বর্ডার থেকে (Cellwall থেকে) Content এর Top, Right, Bottom এবং Left এর জন্য আলাদা আলাদা Value নির্ধারন করে দেওয়া যায়। এটির ফরম্যাট হচ্ছে <table cellpadding=Number) বা CSS এর জন্য <Table Style=“Cellpadding: Number;”>
Cell Padding Attribute
নিচের কোডিংসহ একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<body>
This is no cellpadding
<table border="1">
<tr> <td>Sopnow </td> <td> Officer </td> <td> 20000</td></tr> </table> <br />
This is cellpadding = "10px"
<!--deprecated in HTML5 use CSS -->
<table border="1" cellpadding="10">
<tr> <td>Sopnow </td> <td> Officer </td> <td> 20000</td></tr> </table> <br />
This is CSS padding with different value
<table border="1" style=" background-color:yellow; padding-top:25px; padding-bottom:25px; padding-right:50px; padding-left:10px;">
<tr> <td>Sopnow </td> <td> Officer </td> <td> 20000</td></tr> </table> <br />
</body> </html>
ব্রাউজার দিযে খুললে নিন্মেক্ত ফলাফল পাওয়া যাবে।


Previous Post                                                                                           Next Post

  বিস্তারিত জানতে নিচের বইটি সংগরহ করে নিন।

Book Name: Mastering Microsoft  Word
Writer: Bappi Ashraf
Published By: Gyankosh Prokashani
Amount of Pages: 464
First Publish: October-2004
Last Edition: We've February-2015 edition. Future edition may be existed!
Book Price: BDT 350 (30% Discount)
 The writer of this book has told that he has written this book with the concept of "teach yourself". On the other hand, Web Design is a thing which is interesting to learn. He has also told that the book is full of fan and enjoyment so that a person can learn Web Design by himself by playing with the example projects of this book.  Book's CD Link below... 

 cd

RELATED POST LINKS BELOW ********************************************

Sunday, April 17, 2016

HTML Part 026_Border Style, Border width


Border Style
একইভাবে Border-Style: name, dotted, dashed, solid, double, groove, ridge, inset, outset বা hidder এভাবে দেওয়া যাবে। চারদিক ভিন্ন ভিন্ন Style এর জন্য Color এর মত Clockwise নির্ধারন করে দিতে পারেন। যেমন:
<border-style: solid> বা
<border-style-solid dotted> বা
<border-style: solid dotted double dashed> ইত্যাদি। অথবা অন্যভাবে দেওয়া যায। যেমন:
border-top-style: Name
border-right-style: Name
border-bottom-style: Name
border-left-style: Name

যেমন: নিচের কোডিংসহ একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<body>
<table  border="5" style="height:100px; width:300px;  border-color:red; border-width:3px; border-style:solid dotted double dashed;">
<tr> <td>nova1 </td><td> nova2 </td> <td> nova3 </td><td> nova4 </td> </tr> </table> <br />
<table border="5" style="width:300px; border-color:red; border-width:5px; border-style:dotted;">
<tr><td>nova</td><td></td> <td> </td><td> </td> </tr> </table> <br />
<table border="5" style="width:300px; border-color:red; border-width:5px; border-style:double;">
<tr><td>nova</td><td></td> <td> </td><td> </td> </tr> </table> <br />
<table border="5" style="width:300px; border-color:red; border-width:5px; border-style:dashed;">
<tr><td>nova</td><td></td> <td> </td><td> </td> </tr> </table> <br />
</body>
</html>
ব্রাউজার দিযে খুললে নিন্মেক্ত ফলাফল পাওয়া যাবে।
যেমন: নিচের কোডিংসহ একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html> <body>
<table border="5" style="width:300px; border-color:red; border-width:5px; border-style:groove;">
<tr><td>nova</td><td></td> <td> </td><td> </td> </tr> </table> <br />
<table border="5" style="width:300px; border-color:red; border-width:5px; border-style:ridge;">
<tr><td>nova</td><td></td> <td> </td><td> </td> </tr> </table> <br />
<table border="5" style="width:300px; border-color:red; border-width:5px; border-style:inset;">
<tr><td>nova</td><td></td> <td> </td><td> </td> </tr> </table> <br />
<table border="5" style="width:300px; border-color:red; border-width:5px; border-style:outset;">
<tr><td>nova</td><td></td> <td> </td><td> </td> </tr> </table> <br />
<table border="5" style="width:300px; border-color:red; border-width:5px; border-style:hidden;">
<tr><td>nova</td><td></td> <td> </td><td> </td> </tr> </table> <br />
</body> </html>
ব্রাউজার দিযে খুললে নিন্মেক্ত ফলাফল পাওয়া যাবে।

Border width
একইভাবে Border-width: thin, medium (Default), thick, 1px, 16px বা 20px এভাবে চারদিকে ভিন্ন ভিন্ন Width এর জন্য Color বা Style এর মত Clockwise নির্ধারন করে দিতে পারেন।
যেমন: <border-width:10px> বা <border-width:20px> বা <border-width:5px> ইত্যাদি।  অন্যভাবেও দেওয়া যায়: যেমন: border-top-width:Value, border-right:Value
border-bottom: Value, border-left: Value
যেমন: নিচের কোডিংসহ একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<body>
<table border="5" style="height:50px; width:300px;  border-color:red; border-width:5px 10px 15px 20px;">
<tr> <td>nova1 </td><td> nova2 </td> <td> nova3 </td><td> nova4 </td> </tr> </table> <br />
<table border="5" style="height:50px; width:300px;  border-color:red; border-width:thin
medium thick 10px;">
<tr> <td>nova1 </td><td> nova2 </td> <td> nova3 </td><td> nova4 </td> </tr> </table> <br />
<table  border="5" style=" height:50px; width:300px; border-style:solid; border-color:red; border-top-width:20px;border-right-width:15px;border-bottom-width:10px;border-left-width:5px;">
<tr> <td></td> <td></td> <td></td> <td></td> </tr>
</table>
</body>
ব্রাউজার দিযে খুললে নিন্মেক্ত ফলাফল পাওয়া যাবে।


Previous Post                                                                                           Next Post

  বিস্তারিত জানতে নিচের বইটি সংগরহ করে নিন।

Book Name: Mastering Microsoft  Word
Writer: Bappi Ashraf
Published By: Gyankosh Prokashani
Amount of Pages: 464
First Publish: October-2004
Last Edition: We've February-2015 edition. Future edition may be existed!
Book Price: BDT 350 (30% Discount)
 The writer of this book has told that he has written this book with the concept of "teach yourself". On the other hand, Web Design is a thing which is interesting to learn. He has also told that the book is full of fan and enjoyment so that a person can learn Web Design by himself by playing with the example projects of this book.  Book's CD Link below... 

 cd

RELATED POST LINKS BELOW ********************************************
Part-03 : Html Tag, Attribute, Elements  Extention Name
Part 004_Title Element এর ব্যবহার, নতুন কোডিং লেখা ও Body Element এর ব্যবহার
Part 005_ BR বা Line Break এলিমেন্টের ব্যাবহার
 Part 006_Comments এর ব্যবহার  
Part 007_Font সংক্রামত্ম এলিমেন্ট (ট্যাগ) 
Part 008_Ciation, Quotations এবং Definitation ইত্যাদি ট্যাগ
Part 009_Bi-Directional Override (BDO) ELEMENT 
Part 010_Blinking  Element  
Part 011_Paragraph Element 
Part 012_Heading Element 
Part 013_Html Style Attributs
Part 014_html এ style প্রয়োগ  
Part 015_ Style এ Font Family অ্যাট্রিবিউট
Part 016_Style এ Background Image অ্যাট্রিবিউট
Part 017_Paragraph Element-এ Align Attributes 
Part 018_HR ট্যাগের অনান্য Attributes
Part 019_Html ডিক্লিয়ারেশন
Part 020_Html List, Ordered List, Attribute সহ Ordered List
Part 021_Type Attributes 
Part 022_Unordered List, Attribute Nested List, Definition List
Part 023_ MARGIN ATTRIBUTE, Table Element, Table Element এর Attributes
Part 024_Table এর valign Attributes
Part 025_Table এলিমেন্টের <tbody> <thead> <tfoot> ট্যাগ
Part 026_Border Style, Border width
Part 027_ Colspan, Rowspan,  Cell Padding 
Part 028_HTML এর Layout, Table ব্যবহারে Layout
Part 029_HTML এর Nested Table
Part 030_Division Element, Span element
Part 031_Div এলিমেন্ট ব্যবহার করে Layout
Part 032_<Div> ও <Table> সহ Layout
Part33_গ্রাফিক্স, সংযোজন, এনিমেটেড গ্রাফিক্স,  ইমেজের  SIZE Attributes
Part34_  ছবি Path বা URL,ইমেজের  ALT Attributes,Link Element
Part35_লিষ্ট এর সাথে Link এর ব্যবহার, URL বা Path এর বর্ণনা
Part36_Mailto link তৈরী করা
Part37_FORM ও FORM এর Attributes
Part38_ওয়েব পেজ ভিডিও ও সাউন্ড সংযোগ 
Part39_ভিডিও ফাইল সংযোজন
Part 040_Youtube 
Part 041_ ওয়েব পেজে ব্যবহৃত বিশেষ চিহ্ন