This forum is now read-only. Please use our new forums! Go to forums
Trouble understanding purpose of comments
Hello,
I’m having trouble understanding the purpose of using comments in HTML and CSS /* */. Could someone please explain in which situation would we need to use these comment signs? Thank you so much!
Vi
Answer 55bd54ea9376760a56000385
0 votes
Comments allow the author to document the code so others (self included) can read and understand what is going on. We can use comments as labels, as well. In a template, for instance,
<!-- seo plug-in goes here -->
<!-- end of seo plug-in -->
/* navigation */
/* side bar widget */
and so on. Comments are not part of the document, and are ignored by the browser but are very handy months down the road when a lot of details have been forgotten.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
1 comments
I got it. Thanks a lot!