HTML commenting
writing notes while coding webpages
HTML comments allow us to enter notes in an HTML file and they won't directly affect the run time of a page:
In general:
Comments can also have multiple lines:
DOCTYPE: a special kind of comment
These days, you need only place this at the top of any HTML document or template:
This page will let the browser know that your HTML file uses HTML 5!
Note that although the doctype looks like a comment, it differs in that it begins with only<!
rather than <!--
Doctypes used to look more complex, e.g. in HTML 4.01:
Some code archives and old, under-maintained websites may still have these kinds of DOCTYPES!
Last updated