5. Essential Metadata and HTML Comments
5.1 Essential Metadata in <head>
Metadata is crucial setup information.
Character Set (<meta charset>)
This tells the browser which character encoding to use. UTF-8 is the standard and must always be used, as it supports almost all characters and symbols worldwide.
html
Viewport Meta Tag (Crucial for Mobile)
This tag controls the page's dimensions and scaling on mobile devices, ensuring your site is responsive.
html
5.2 HTML Comments
Comments are notes you leave in your code for yourself or other developers. They are completely ignored by the browser and are not visible to the user.
Comment Syntax
Comments start with <!-- and end with -->.
html
<!-- WARNING: This content is outdated and needs updating -->
<p>Old content...</p>