CSS rule တစ်ခုမှာ အဓိကအားဖြင့် selector နဲ့ declaration block ပါပါတယ်။ Selector က “ဘယ် element ကို style လုပ်မလဲ” ဆိုတာရွေးတာပါ။ Declaration block ကတော့ { ... } ထဲမှာ property: value; ပုံစံနဲ့ “ဘာကို ဘယ်လိုပြောင်းမလဲ” ဆိုတာရေးတာပါ။
CSS မှာ semicolon ; မေ့တာက beginner တွေကြားမှာ အလွန် common ပါ။ semicolon က sentence အဆုံးမှာ full stop တင်သလို CSS declaration တစ်ကြောင်းပြီးကြောင်းပြောပေးပါတယ်။ မထားလည်း တစ်ခါတလေ browser ကခန့်မှန်းပေးပေမယ့် မယုံပါနဲ့ — browser ကို fortune teller မလုပ်ခိုင်းတာကောင်းပါတယ်။
/* 'h1' is the selector */
h1 {
/* 'color' is the property, 'blue' is the value */
color: blue;
font-size: 24px;
}<h1> element အားလုံးရဲ့ စာသားအရောင်က အပြာရောင်ဖြစ်ပြီး font size က 24px ဖြစ်သွားပါမယ်။Warning
Property name မှားရင် browser က error မပြဘဲ ငြိမ်နေတတ်ပါတယ်။ ဥပမာ font-szie လို့ရေးမိရင် CSS က “မသိဘူးနော်” ဆိုပြီးကျော်သွားပါလိမ့်မယ်။