<body> အပိုင်း
<body> အပိုင်းမှာတော့ သုံးစွဲသူတွေ မြင်ရမယ့် webpage ရဲ့ အကြောင်းအရာ အားလုံး ပါဝင်ပါတယ်။ ခေါင်းစဉ်တွေ၊ စာပိုဒ်တွေ၊ ပုံတွေနဲ့ link တွေလိုမျိုး အရာအားလုံးကို ဒီနေရာမှာပဲ ထည့်ရမှာ ဖြစ်ပါတယ်။
<body> ထဲမှာ အသုံးများတဲ့ element တွေ:
Section titled “<body> ထဲမှာ အသုံးများတဲ့ element တွေ:”-
Headings (
Section titled “Headings (<h1> to <h6>):”<h1>to<h6>):ခေါင်းစဉ်တွေက စာမျက်နှာရဲ့ တည်ဆောက်ပုံကို သတ်မှတ်ပေးပြီး အကြောင်းအရာတွေကို စနစ်တကျ ဖြစ်အောင် ကူညီပေးပါတယ်။
<h1>က အရေးအကြီးဆုံး ခေါင်းစဉ်ဖြစ်ပြီး<h6>ကတော့ ခေါင်းစဉ်ငယ် ဖြစ်ပါတယ်။ဥပမာ:
HTML <h1>This is the main heading</h1><h2>This is a subheading</h2> -
Paragraphs (
Section titled “Paragraphs (<p>):”<p>):စာပိုဒ်တွေ သတ်မှတ်ဖို့အတွက်
<p>tag ကို သုံးပါတယ်။ဥပမာ:
HTML <p>This is a paragraph of text.</p> -
Images (
Section titled “Images (<img>):”<img>):<img>tag ကို စာမျက်နှာပေါ်မှာ ပုံတွေဖော်ပြဖို့ သုံးပါတယ်။ဥပမာ:
HTML <img src="image.jpg" alt="ပုံအကြောင်း ရှင်းပြတဲ့စာ"> -
Links (
Section titled “Links (<a>):”<a>):<a>tag ကို တခြားစာမျက်နှာတွေကို ချိတ်ဆက်ပေးတဲ့ hyperlink တွေ ဖန်တီးဖို့ သုံးပါတယ်။ဥပမာ:
HTML <a href="https://www.example.com">Visit Example</a>
နမူနာ - အခြေခံ HTML Page တစ်ခု
Section titled “နမူနာ - အခြေခံ HTML Page တစ်ခု”ခုနက ပြောခဲ့တာတွေအားလုံးကို ပေါင်းစပ်ထားတဲ့ နမူနာတစ်ခုကို ကြည့်လိုက်ရအောင်။
<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Simple Page</title> </head> <body> <h1>Welcome to My Simple Webpage</h1> <p>This is a paragraph of text on my webpage.</p> <img src="example.jpg" alt="An example image"> <a href="https://www.example.com">Visit Example</a> </body></html>ရှင်းလင်းချက် -
<!DOCTYPE html>: Browser ကို HTML5 သုံးထားကြောင်း ပြောပြပါတယ်။<html>tag: စာမျက်နှာတစ်ခုလုံးကို ခြုံငုံထားပါတယ်။<head>tag: စာမျက်နှာ ခေါင်းစဉ်နဲ့ meta tag တွေလို metadata တွေ ပါဝင်ပါတယ်။<body>tag: မြင်ရတဲ့ အကြောင်းအရာတွေ (ခေါင်းစဉ်၊ စာပိုဒ်၊ ပုံ၊ link) တွေ ပါဝင်ပါတယ်။