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.