Commenting code in CSS and HTML

I see the cursor definition goes away when I comment using //

.para1
{
text-align:center;
color:blue;
//cursor: pointer;
}

But is that the right way to comment code in CSS?

How about HTML?

Thanks.
newbiewebSr. Software EngineerAsked:
Who is Participating?
 
CKY092Connect With a Mentor Commented:
The correct way to comment in CSS is /* comment */
The correct way to comment in HTML is <!-- comment -->
0
 
CKY092Connect With a Mentor Commented:
And I believe the reason the cursor definition went away is due to the syntax error.
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks!
0
All Courses

From novice to tech pro — start learning today.