close[x]


CSS

CSS-Home CSS-Environment CSS-Basic syntax CSS-Selector CSS-How To Add CSS CSS-Comment CSS-Color CSS-Background CSS-Font CSS-Text CSS-Boarder CSS-Margin CSS-Padding CSS-Height/Width CSS-Link CSS-Table CSS-Visibility CSS-Scrollable CSS-Float/Clear CSS-Line CSS-Align CSS-Dimension CSS-Event CSS-Pusedo class CSS-Position CSS-Transparency CSS-Dropdown CSS-Form CSS-List/Counter CSS-Website layout CSS-Text effect CSS-Image effect CSS-Button effect CSS-page number CSS-Box CSS-@media CSS-Multi device CSS-Multi device 1 CSS-Multi device 2



learncodehere.com




CSS - Comments

CSS comments are a piece of code which is ignored by browsers.

CSS comment allows developers to leave notes about their code.

Commenting in CSS allows developers to leave notes about their code.

It is a good practice to add comments into your CSS code, especially in complex documents

Comments are single or multiple lines statement and written within /*............*/ .

These styles are not good to be edited because they are not stored at a single place.


Example : CSS - Comments

<!DOCTYPE html>
<html>
<head>
<style>
p {
/* this is a comment ignored by browser. */
text-align: center;
color: blue;
/* Multi line CSS Comments
ignored by browser. */
}
</style>
</head>
<body>
<p>Code Always.</p>
<p>Code Always To Become Best Programmer.</p>
</body>
</html>

The texts written within /*....*/ are ignored by browsers.

When the above code is compiled , it produces the following result.

Result

Code Always.

Code Always To Become Best Programmer.