HTML comment

No matter if you are a beginner who wants to know more about HTML code or an advanced website developer who is keen to learn more information about HTML comments, in this article you will read more about how HTML comments function within your HTML source code. With the commonly used example in this article you can apply HTML comments in your own website. Also this article explains how an HTML editor can make your HTML coding a whole lot easier.

What is HTML?

When you want to set up a webpage, you will have to write the content of that page down in a HTML document. HTML is the abbrevation for Hyper Text Markup Language. It was used for the first time in 1989 by Tim Berners-Lee and Robert Cailiau. With this HTML language computers, browsers and other users can identify what needs to be done to make the website function properly. The HTML document can contain links to other spots in the file or it can direct you to another webpage. With HTML tags, attributes and comments, the HTML code speaks to computers about which actions they have to undertake.

What is an HTML comment?

Usually HTML codes can get complicated. You have to write many tags, attributes and codes down to make the website work well. With an HTML comment you can write comments for yourself or other website developers about the source code. These HTML comments are not displayed in the website browsers, but they make it easier for you or others to explain the HTML code at a later date.

Why use an HTML comment?

The benefits of using an HTML comment are huge. Especially when dealing with complex documents, HTML comments provide information for how the HTML code works. Not only does this help you at a later time when you want to edit your HTML code, it also assists other website developers who work for you on the website. HTML comments help you and other website developers to understand how your code works and increase the readibility of the HTML code.

How to write an HTML comment

HTML comments are written down inbetween <!– … — > tags. Browsers will ignore any content that is placed between these kind of tags. You will not find it back when visiting the website. Make sure you enter no space between the < and !, otherwise the comment will be visible on the webpage.

HTML editor for HTML comments

It can be tough for website developers to write down a proper HTML code, especially with a lot of complex content. An HTML editor therefore is a great assistent. The HTML editor checks and corrects any errors within the HTML code. In this way you can easily spot the faults and change them. Learn more about HTML editing for your website here.