HTML (এইচটিএমএল) কী?
HTML এর সম্পূর্ণরূপ হলো Hypertext Markup Language। যে কোনো ওয়েবসাইট / ওয়েব পেইজ গঠন করার জন্য প্রাথমিক যে কোডিং ভাষা ব্যবহার করা হয়, সেটা হলো HTML। আমরা একটি ওয়েবসাইট / ওয়েব পেইজ এ যা কিছু দেখতে পাই তা হলো ওই ওয়েবসাইট / ওয়েব পেইজ এর content। এই content গুলো ওয়েবসাইট এ সঠিকভাবে দেখানোর জন্য HTML এ বিভিন্ন command ব্যবহার করা হয়।এই command গুলোকে বলা হয় HTML tag. HTML এ অনেক ধরনের tag আছে। এর এক একটা tag এর কাজ এক এক রকম। কোন tag লেখাকে bold করে কোন টা আবার italic করে কোনটা আবার লেখাকে page এর center এ আনে। এই HTML tag গুলোর মাঝে আমরা যে data/image/video রাখব browser সেটা যেভাবে command দেওয়া আছে, সেভাবে display করবে।কিছু HTML tag পরিচিতিঃ
Opening Tag | Closing Tag | Description |
<!-- | --> | Comment. Anything between these tags is not displayed on the screen. This is useful for making notes to yourself or to others who may view the source code of the web page. |
<html> | </html> | Opens and closes an HTML document |
<head> | </head> | The first of two main sections of an HTML document. The <head> section is used to provide information about the document for use primarily by search engines and browsers. |
<title> | </title> | The title of document. This element is nested inside the <head> section. In HTML5, this is the only required tag other than the DOCTYPE declaration. |
<body> | </body> | The second of two main sections of an HTML document. The <body> section contains all the content of the web page. |
<h1> to <h6> | </h1>to</h6> | Headings. H1 is the main heading, H2 is secondary, etc. |
<p> | </p> | Paragraph |
<a href = " "> | </a> | Link |
<b> | </b> | Makes the contained text bold. |
<ol> | </ol> | Ordered (numbered) list |
<ul> | </ul> | Unordered (bulleted) list |
<li> | </li> | List item, must be nested inside a list element such as a <ol> or <ul> |
<table> | </table> | Adds a table |
<tr> | </tr> | Table row (start & end). |
<th> | </th> | When creating a table to display data, use this tag to differentiate the first row or column of cells as heading cells for all the other cells in the same column or row. Browsers typically display this element bold and centered within the table cell. |
<td> | </td> | Table data cell. |
Tag | Description |
<br /> | Line break. |
<img src =" " alt="alternate text" /> | Inserts an image into a web page. |
Text Editor
Text Editor হলো যে file এ আমরা HTML কোড লিখবো। অনেক ধরনের Text Editor আছে যেগুলোতে HTML কোড execute হয়। আমরা এখানে Text Editor হিসেবে Notepad ব্যবহার করবো। সাধারণত Notepad Text file এর এক্সটেনশন হচ্ছে .txt। এই .txt এক্সটেনশন পরিবর্তন করে .html করা হলে সেটাই হবে HTML file।
উপরের চিত্রটি লক্ষ্য করি, যখন আমরা HTML file টি Save করতে যাবো তখন অবশ্যই আমাদেরকে Save as type থেকে All Files বেছে নিতে হবে (ছবিতে Green arrow দ্বারা চিহ্নিত) এবং File name এর এক্সটেনশন .html লিখতে হবে (ছবিতে Red arrow দ্বারা চিহ্নিত). যদি অন্য কোনো এক্সটেনশন থাকে, তবে সেটি ডিলিট করে .html লিখতে হবে। তারপর Save বাটনে ক্লিক করতে হবে।
ওয়েবসাইট / ওয়েবপেইজ তৈরির প্রাথমিক ধাপঃ
এই <body>to </body> tag এর মাঝখানে web page এর সকল content (text/image/video) থাকবে। |
এখন আমরা নিচের কোডটি Notepad এ লিখবো এবং HTML File হিসেবে Save করবো।
Code:
<html>
<head>
<title> My First Website </title>
<body>
<h1> Hello Everyone!!!</h1>
<p> We are an educational organisation that provides ICT training for all. Our trainers are experienced and hardworking. Our courses are affordable. Anyone can attend our courses to enhance their skills. </p>
</body>
</html>
এরপর File টি যেকোনো web browser (যেমনঃ Firefox, Google Chrome, UC Browser etc.) ব্যবহার করে open করবো
Webpage টি নিম্নরূপে show হবেঃ
এভাবেই আমরা প্রাথমিকভাবে একটি Web page তৈরি করলাম।