CSS Comments
CSS Comments : Hiding Non-Usable Code
- Comments are used to explain code.
- Comments are used to hide non-usable code.
- Comments are ignored by browser.
- Comments are used while debugging the code.
- CSS comment begins with “/*“, and ends with “*/“
Live Example of CSS Comment :
/*This is a First comment*/ h1 { text-align : right; color : /*This is Second comment*/ red; font-family : arial; /*This is Third comment*/ }
this CSS code consists of Comments. Comments are ignored by the browser so browser will read block of code in this manner -
h1 { text-align : right; color : red; font-family : arial; }