1. inline style sheet เป็นการแทรกแอททริบิวต์ “style” ลงในแท็ก HTML
ตัวอย่าง
< !DOCTYPE html >
< html >
< body >
< h1 style="color:blue;text-align:center;" > This is a heading h1>
< p style="color:red;" > This is a paragraph. p>
< / body >
< / html >
2. Internal style sheet เป็นการ
กำหนดรูปแบบสไตล์ชีทที่ต้องการไว้ในส่วนเริ่มต้น
ของเอกสาร HTML
ตัวอย่าง
< !DOCTYPE html >
< html >
< head >
< style >
body {
background-color: linen;
} h1 {
color: maroon;
margin-left: 40px;
}
< / style >
< / head >
< body>
< h1>This is a heading < / h1 >
< p >This is a paragraph.< / p >
< / body >
< / html >