CSS comments
Comments are declared within stylesheet definitions so that code would be easier to understand and navigate. Comments in CSS are ignored by web browsers.
This tutorial focuses on:
- Including comments in stylesheet definitions
Including comments in stylesheet definitions
Comments begin with /* and end with */ and can span as many lines as you want.
Example:
<html>
<head>
<style type="text/css">
/* this is a comment
this is another comment
*/
p{
color: green; /* the color of the text in the paragraph */
font-family: Courier;
margin-top: 0;
margin-left: 0; /* the left margin of the paragraph */
}
</style>
</head>
<body>
<p>
The text in this paragraph will be green.
</p>
</body>
</html>