Thuta Learning
ရှာဖွေရန်
BasicWeb Developmentbeginner

Basic Structure

စိတ်လျှော့ပါ။ ဒီခန်းကို စာအုပ်လိုမဟုတ်ဘဲ စကားပြောသလိုပဲ၊ နားလည်လွယ်အောင် ရှင်းပါမယ်။

HTML file တစ်ခုရဲ့ standard structure မှာ <!DOCTYPE html>, <html>, <head>, <body> ဆိုတဲ့ အဓိကပိုင်းတွေပါပါတယ်။

  • <!DOCTYPE html> — ဒီ file က modern HTML5 ဖြစ်တယ်လို့ browser ကိုပြောတာ။
  • <head> — user မမြင်ရတဲ့ settings တွေ၊ title, meta, CSS link စတာတွေထားတဲ့နေရာ။
  • <body> — user မြင်ရမယ့် actual content တွေထားတဲ့နေရာ။
html
<!DOCTYPE html>
<html lang="my">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My First Page</title>
</head>
<body>
  <h1>My First Heading</h1>
  <p>My first paragraph.</p>
</body>
</html>
You should see
Browser tab မှာ title ပေါ်ပြီး page ထဲမှာ heading နဲ့ paragraph ပေါ်လာပါမယ်။