0% completed
CSS comments let you add notes inside your CSS files. They help explain the code so that others reading it will know what the rules are meant to do. Using comments makes your code easier to follow.
These comments are not shown in the web page. They only appear in the code, which makes them useful for reminders or explanations about specific styling rules.
Follow below syntax to add comments in CSS code.
/* This is a CSS comment */
Explanation:
/*
starts the comment and */
ends it.In this example, we will show how to add comments in an internal CSS section within an HTML file. The example helps you see comments used for explaining the purpose of different CSS rules.
Explanation:
body
rule sets the font and margin.h1
rule changes the color and includes an inline comment.This lesson shows how to use CSS comments to make your code more understandable without affecting the layout or style of your web page.
.....
.....
.....