selector { property: value } |
body { color: black } |
p {font-family: "Angsana UPC"} |
p {text-align:center; color: red} |
p { text-align: center; color: black; font-family: arial } |
h1, h2, h3, h4, h5, h6 {color: green} |
p.right { text-align: right } p.center { text-align: center} |
<p class="right" > พารากราพนี้จะจัดชิดขวา </p> <p class="center" > พารากราพนี้จะจัดกลางหน้า </p> |
.center { text-align: center} |
<h3 class="center" > หัวพารากราพนี้จะจัดกลางหน้า </p> <p class="center" > พารากราพนี้จะจัดกลางหน้าเช่นกัน </p> |
p#para5 { text-align: center; color:blue} |
<p id="para4" >พารากราพ 4 1</p> <p id="para5" >พารากราพ 5 1</p> |
*#r345 { color: yellow} |
<h1 id="r345">หัวพารากราพระดับ 1</h1> <h2 id="r345">หัวพารากราพระดับ 2</h2> |
/* นี่คือหมายเหตุ */ p { text-align: center; color: black; font-family: arial } /* นี่ก็เป็นหมายเหตุเช่นกัน แต่เขียนไว้ 2 บรรทัด */ h1, h2, h3, h4, h5, h6 {color: green} |