Welcome Guest! (App Version 3.1)

websitnero logo name

Comments

Adding Comments in CSS

Comments are added to add semantic meaning to the various chunks of code. Comments are added to help a programmer understand what a certain chunk of code is actually doing in the program or web page. Comments never add any effect or behavior to an HTML Document for the end user. They are only there in the code for enhancing the information and adding a kind of metadata to a portion of code for any new programmer who has not developed this code, but trying to understand it.

Note: "Whatever is written inside comments is never rendered by the browser. So UI remains uneffected by their presence."

The sole purpose of adding comment is either to test some changes and keep those for future use or implementation, or to make any new programmer understand what a set of code snippet is actually doing in the styles page.

/* Comments */

Example

<head>
<style>
p{
  background:yellow;
  /*color:red;*/
  font-size:20px;
}
</style>
</head>

<body> 
  <p>This is a paragraph.</p>
</body> 
Further Reading

1. Comments in CSS

WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.