How to comment your HTML code

How to comment your HTML code

Published 04. may 2018 10:24 by Stein Ove Helset

Commenting your code is very important. It's important for you, and it's important for people you work with. Just imagine that you write a short snippet of HTML code, of course you will understand at the time what it does and why you solved it in the way you did. But what about six months from now? Wouldn't it be great to know why you did what?

<!-- This is a comment -->

You can also make a comment in your code that spans over multiple lines.

<!--
This is also a comment
which spans over multiple lines
-->

Conclusion

This was a very short guide, but it was an important one. Remember to comment your code and you will thank me later. Also, just start right away commenting your code maybe you'll even understand what you are doing better because you describe it to your self in other words.

Share this post

Comments

No comments yet

Add comment

Sign in to add a comment