Font Property

font-family property ត្រូវ​ប្រើប្រាស់​សំរាប់​កំណត់​យក​ប្រភេទ​ពុម្ព​អក្សរ​ ក្នុង​ការបង្ហាញ​អត្ថបទ​នៅ​ក្នុង​ element ទាំងឡាយ​។

<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  	<title>Font Property</title>
    <style>
      p.impact {
  		font-family: Impact, Charcoal, sans-serif;
	  }
    </style>
  </head>
  
  <body>
	

CSS font-family

This is a paragraph, shown with the Impact font.

</body> </html>

CSS font-family

This is a paragraph, shown with the Impact font.


font-style ត្រូវ​ប្រើប្រាស់​សំរាប់​ធ្វើ​តួ​អក្សរ​មាន​ភាពទ្រេត (italic) ឬ​ត្រង់​ធម្មតា (normal) ។

<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  	<title>Font Property</title>
    <style>
      p.normal {
  		font-style: normal;
	  }

	  p.italic {
  		font-style: italic;
	  }
    </style>
  </head>
  
  <body>
	

This is a paragraph in normal style.

This is a paragraph in italic style.

</body> </html>

This is a paragraph in normal style.

This is a paragraph in italic style.


font-weight ត្រូវ​ប្រើប្រាស់​សំរាប់​ធ្វើ​អោយ​តួ​អក្សរ​មាន​ភាព​ក្រាស់​ឬ​ស្តើង​។

<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  	<title>Font Property</title>
    <style>
      p.normal {
  		font-weight: normal;
	  }

	  p.light {
  		font-weight: lighter;
	  }

	  p.thick {
  		font-weight: bold;
	  }

	  p.thicker {
  		font-weight: 900;
	  }
    </style>
  </head>
  
  <body>
	

This is a paragraph.

This is a paragraph.

This is a paragraph.

This is a paragraph.

</body> </html>

This is a paragraph.

This is a paragraph.

This is a paragraph.

This is a paragraph.


font-size ត្រូវប្រើប្រាស់​សំរាប់​កំណត់​ទំហំ​របស់​តួ​អក្សរ​។

<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  	<title>Font Property</title>
    <style>
      h1 {
  		font-size: 40px;
	  }

	  h2 {
  		font-size: 30px;
	  }

	  p {
  		font-size: 14px;
	  }
    </style>
  </head>
  
  <body>
	

This is heading 1

This is heading 2

This is a paragraph.

This is another paragraph.

</body> </html>

This is heading 1

This is heading 2

This is a paragraph.

This is another paragraph.


Google Fonts គឺ​ជា​ពុម្ព​អក្សរ​ទាំងឡាយ​ណា​ដែល​មាន​នៅ​លើ​ប្រព័ន្ធ Google Fonts រួម​ទាំង​ពុម្អ​អក្សរ​ខ្មែរ​ផងដែរ​។ ដើម្បី​អាច​យក​ពុម្ព​អក្សរ​ទាំងនោះ​មក​ប្រើប្រាស់​បាន យើង​ចាំបាច់​ត្រូវ​ដាក់​តំណរភ្ជាប់​ទៅ​កាន់​ពុម្ព​អក្សរ​ទាំងនោះ​។

<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    
  	<title>Font Property</title>
    <style>
      body {
  		font-family: "Moul";
  		font-size: 22px;
	  }
    </style>
  </head>
  
  <body>
	

Moul Font

នេះ​ជា​ការប្រើប្រាស់​ពុម្ព​អក្សរ​ឆ្លាក់​ខ្មែរ

</body> </html>

Moul Font

នេះ​ជា​ការប្រើប្រាស់​ពុម្ព​អក្សរ​ឆ្លាក់​ខ្មែរ


font ជា property ប្រើប្រាស់​សំរាប់​កំណត់​ជា​សរុប​នូវ​បណ្តា​តំលៃ​ទាំងឡាយ​ទាក់ទង​នឹង​ការប្រើប្រាស់​ពុម្ព​អក្សរ​។

<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    
  	<title>Font Property</title>
    <style>
      h1 {
      	font: 25px Moul;
      }
      p.a {
  		font: 20px Arial, sans-serif;
	  }

	  p.b {
  		font: italic bold 12px/30px Georgia, serif;
	  }
    </style>
  </head>
  
  <body>
	 

ពុម្ព​អក្សរ​ឆ្លាក់​ខ្មែរ

This is a paragraph. The font size is set to 20 pixels, and the font family is Arial.

This is a paragraph. The font is set to italic and bold, the font size is set to 12 pixels, the line height is set to 30 pixels, and the font family is Georgia.

</body> </html>

ពុម្ព​អក្សរ​ឆ្លាក់​ខ្មែរ

This is a paragraph. The font size is set to 20 pixels, and the font family is Arial.

This is a paragraph. The font is set to italic and bold, the font size is set to 12 pixels, the line height is set to 30 pixels, and the font family is Georgia.