CSS Comment

CSS comment is used to comment on the code. It is the best way to understand the code.

The Commented code are ignored by the browser.

CSS Comment Tutorial – In CSS, Single and Multiple Comments are written within /*…..*/ character.

<!DOCTYPE html>
<html>
<head>
<style>
H1 {
background-color: red;
/* This is a single-line comment */
text-align: center;
}
/* This is a multi-line comment
Its code ignored by browser.
*/
</style>
</head>
<body>
<h1>CSS Comments</h1>
</body>
</html>
Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy