color ត្រូវគេប្រើប្រាស់សំរាប់កំណត់ពណ៌របស់ពុម្ពអក្សរនៅក្នុងអត្ថបទទាំងឡាយ។
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>Text Property</title> <style> body { background-color: lightgrey; color: blue; } h1 { background-color: black; color: white; } </style> </head> <body>This Heading is Black with White Text
This page has a grey background color and a blue text.
Another paragraph.
</body> </html>
This Heading is Black with White Text
This page has a grey background color and a blue text.
Another paragraph.
text-align ត្រូវគេប្រើប្រាស់សំរាប់កំណត់ទីតាំងរបស់អត្ថបទនៅក្នុង element ទាំងឡាយ។
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>Text Property</title> <style> h1 { text-align: center; } h2 { text-align: left; } h3 { text-align: right; } </style> </head> <body>Heading 1 (center)
Heading 2 (left)
Heading 3 (right)
The three headings above are aligned center, left and right.
</body> </html>
Heading 1 (center)
Heading 2 (left)
Heading 3 (right)
The three headings above are aligned center, left and right.
តែបើសិនជាយើងចង់អោយអត្ថបតំរៀបស្មើគ្នា ទាំងនៅជ្រុងខាងឆ្វេង ទាំងនៅជ្រុងខាងស្តាំ យើងចាំបាច់ត្រូវផ្តល់តំលៃ justify សំរាប់ property text-align
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>Text Property</title> <style> div { border: 1px solid black; padding: 10px; width: 200px; height: 200px; text-align: justify; } </style> </head> <body>Example text-align: justify;
The text-align: justify; value stretches the lines so that each line has equal width (like in newspapers and magazines).
In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since. 'Whenever you feel like criticizing anyone,' he told me, 'just remember that all the people in this world haven't had the advantages that you've had.'</body> </html>
Example text-align: justify;
The text-align: justify; value stretches the lines so that each line has equal width (like in newspapers and magazines).
text-decoration ត្រូវប្រើប្រាស់សំរាប់កំណត់អោយអត្ថបទនៅក្នុង element a មានបន្ទាត់គូសពីក្រោមឬអត់។ បើយើងផ្តល់តំលៃដល់ property នេះជា none អត្ថបទនៅក្នុង a នឹងគ្មានការគូសបន្ទាត់ពីក្រោមឡើយ។
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>Text Property</title> <style> a { text-decoration: none; } </style> </head> <body>A link with no underline: khmerjs.org/
</body> </html>
A link with no underline: khmerjs.org/
ចំណែកឯ text-shadow វិញ ត្រូវគេប្រើប្រាស់សំរាប់ធ្វើអត្ថបទមានស្រមោល ដោយធ្វើដូចខាងក្រោមនេះ៖
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>Text Property</title> <style> h1 { text-shadow: 2px 2px 5px red; } </style> </head> <body>Text-shadow effect!
</body> </html>