Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> JavaScript

วิธีตั้งค่า Font Family ใน HTML

ใช้ Attribute style ร่วมกับ CSS Property font-family HTML5 ไม่รองรับ Tag <font> แล้ว

โปรดทราบ: Style Attribute ทับทับ Global Styles

วิธีตั้งค่า Font Family ใน HTML

ตัวอย่าง

<!DOCTYPE html> <html> 
  <head> 
    <title>HTML Font Family</title> 
  </head> 
  <body> 
    <h1>Our Products</h1> 
    <p style="font-family:georgia,garamond,serif;"> 
      This is demo text 
    </p> 
  </body> 
</html>