ស្រដៀងគ្នានឹង comment នៅក្នុងឯកសារ HTML ដែរ នៅក្នុងភាសា CSS, comment ត្រូវធ្វើឡើងនៅក្នុងសញ្ញា /* */ ដើម្បីធ្វើកំណត់ពន្យល់ផ្សេងៗ និងដែលត្រូវរំលងចោល នៅពេលកូដ CSS ត្រូវយកទៅអនុវត្ត។
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>CSS Comment</title>
<style>
/* This is a single-line comment */
p {
color: red; /* Set text color to red */
}
</style>
</head>
<body>
Hello World!
This paragraph is styled with CSS.
CSS comments are not shown in the output.
</body>
</html>
Hello World!
This paragraph is styled with CSS.
CSS comments are not shown in the output.
Comment ក៏អាចត្រូវធ្វើឡើងជាច្រើនបន្ទាត់បានដែរ។
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>CSS Comment</title>
<style>
/* This is
a multi-line comment */
p {
color: red; /* Set text color to red */
}
</style>
</head>
<body>
Hello World!
This paragraph is styled with CSS.
CSS comments are not shown in the output.
</body>
</html>
Hello World!
This paragraph is styled with CSS.
CSS comments are not shown in the output.














