HTML Comments
HTML Comments:
Comments are not displayed on the Browser but they can help document your HTML Source code.
Types of Comments:
Single-line comments: Used for brief explanations on a single line.
Multi-line comments: Used for longer explanations or for commenting out blocks of code.
Purpose of comments:
- Use comments wisely to enhance code readability and maintainability.
- They’re like your personal notes within the code, helping you and others navigate its complexities and make sense of its logic.
Single-line Comment:
<!– this is single line comment — >
Multi-line comment:
<!– This is a multiline
comment that spans
multiple lines –>
Example: