যা জানবো...
সিএসএস (Cascading Style Sheet files) মাধ্যমে ওয়েবসাইটকে অনেক সুন্দর করে তোলা যায়। এখানে HTML ইলিমেন্টের সাথে স্টাইলের ব্যবহার প্রণালী নিয়ে বিস্তারিত আলোচনা করা হবে।।।।
স্টাইলের ব্যবহার
Style, HTML এর একটি নতুন এট্রিবিউটস, এর মাধ্যমে HTML এর মধ্যেই CSS ব্যবহারের সুযোগ সৃষ্টি হয়। Style তথা CSS ব্যবহারের মাধ্যমে ওয়েব পেজের বিভিন্ন উপাদানের ডিজাইন তৈরি করা হয়। অন্যান্য এট্রিবিউটস যেমন align="center", align="left", bgcolor="green", height="100px", width="50px, bgcolor="green" ইত্যাদির মাধ্যমে যদিও ডিজাইন তৈরি করা যায়, তবে এক্ষেত্রে Style ব্যবহারে বিশেষ সুবিধা পাওয়া যায়।
উদাহরণ প্রোগ্রাম: অন্যান্য এট্রিবিউটস্ ব্যবহার করে
<html>
<head>
<title> www.tutohost.com</title>
</head>
<body bgcolor=" green">
<font size="2" face="Verdana">This is a paragraph.
</font>
<br />
<font size="5" face="Tahoma" color="red" >Bangladesh is a beautiful country.
</font>
</body>
</html>
<head>
<title> www.tutohost.com</title>
</head>
<body bgcolor=" green">
<font size="2" face="Verdana">This is a paragraph.
</font>
<br />
<font size="5" face="Tahoma" color="red" >Bangladesh is a beautiful country.
</font>
</body>
</html>
উদাহরণ প্রোগ্রাম: স্টাইল ব্যবহার করে
<html>
<head>
<title> www.tutohost.com</title>
</head>
<body bgcolor=" green">
<font style="font-family:Verdana; font-size:15px" >This is a paragraph.
</font>
<br />
<font style=" font-size:25px; font-family:Tahoma; color:red;" >Bangladesh is a beautiful country.
</font>
</body>
</html>
<head>
<title> www.tutohost.com</title>
</head>
<body bgcolor=" green">
<font style="font-family:Verdana; font-size:15px" >This is a paragraph.
</font>
<br />
<font style=" font-size:25px; font-family:Tahoma; color:red;" >Bangladesh is a beautiful country.
</font>
</body>
</html>
একটা নোটপ্যাড open করে উপরের code টুকু লিখে file মেনু থেকে Save as এ ক্লিক করে File name: index.html , Save as type : All files, দিয়ে save করে index.html ফাইলটি Mozilla Firefox দিয়ে open করলে পাশে প্রদর্শিত ছবির মত দেখাবে।
0 comments: