CSS Comment

ស្រដៀង​គ្នា​នឹង 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.