Menu

Comments and Clean Code Practices

Comments and Clean Code Practices

HTML comments are notes left in the code that browsers ignore. They help you or other developers understand a section of code later.

Good practice also includes consistent indentation, using lowercase for tag names, always closing tags properly, and organizing your code in a way that reads top to bottom the same way the page visually flows.

<!-- This is the main navigation bar -->

<nav>

  <a href="#">Home</a>

</nav>

Note: Anything between the exclamation mark dashes and the closing dashes is invisible on the actual page. It exists only to help humans read the code faster, which becomes especially valuable on larger projects.


HTML Tutorial (From Basics to Implementation)

AP

Abhishek Pati





Get in Touch For Details