HTML/HTML Advanced

HTML Comments & Meta Tags

Updated on January 6, 2026
2 min read

What is HTML Comments?

HTML comments are used to write notes in code.

They are not visible in the browser.

Syntax

<!-- This is a comment -->

Example

<!-- Heading starts here -->
<h1>Hello HTML</h1>

Why Use Comments?

  • Understand code later
  •  Help team members
  •  Debugging

What are Meta Tags?

Meta tags provide information about the web page to the browser and search engines.

Meta tags are written inside the <head> tag.

Common Meta Tags

1. Charset

<meta charset="UTF-8">

Supports all languages

2. Viewport (Mobile Friendly)

<meta name="viewport" content="width=device-width, initial-scale=1.0">

3. Description (SEO)

<meta name="description" content="Learn Syntax free HTML in easy way">

4. Keywords (Old SEO)

<meta name="keywords" content="HTML, CSS, Web Development">

4. Author

<meta name="author" content="Sadique Hassain">

Complete Head Example

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="HTML tutorial">
  <title>My Website</title>
</head>

Important Notes 

  1. Meta tags do not display content
  2.  Important for SEO
  3.  Always use charset & viewport

HTML Comments & Meta Tags | HTML | Learn Syntax