Comments
Like any computer language, HTML provides the ability to leave comments. Such comments are are completely ignored by the computer—they are for you, the programmer. They might be a reminder about “hey, you still need to improve this part”. They might explain what you did to somebody else using your code later. They might help add even more structure.
To create a comment, use two special tags: <!--
and -->
When the file is displayed, these comments don’t do anything. (And if you use a different system and then export to HTML, the comments are completely stripped away in most cases. I do that as well, which is why you won’t find comments in the source code of this website.)
Another common use case is to quickly remove a part of the web page. Place it between the comment tags, and it will be ignored. It allows you to rapidly see what the page looks like without that HTML. (Without the need to copy-paste, potentially lose it, or create multiple versions of the file.)
Try it in the example below. Removing the comment tags should bring back our paragraph!
Now I’ve taught you everything I can without explaining what attributes are. (The second component of HTML, which I mentioned at the start, remember?)
It is time. Let’s see what an attribute is.
Want to support me?
Buy one of my projects. You get something nice, I get something nice.
Donate through a popular platform using the link below.
Simply giving feedback or spreading the word is also worth a lot.