Common Types of Meta Tags
1. Meta Description
Provides a brief summary of the webpage’s content, used by search engines to display in search results.
<meta name=”description” content=”This is a webpage about HTML meta tags and their functions.”>
2. Meta Keywords
Specifies keywords relevant to the content of the page. (Less important for SEO nowadays.)
<meta name=”keywords” content=”HTML, meta tags, webpage, SEO”>
3. Viewport
Controls how the webpage is displayed on mobile devices.
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
4. Character Set
Specifies the character encoding for the webpage (UTF-8 is commonly used).
<meta charset=”UTF-8″>
5. Author
Specifies the name of the content’s author.
<meta name=”author” content=”John Doe”>
Example of Meta Tags in HTML
<!DOCTYPE html>
<html>
<head>
<meta charset=”UTF-8″>
<meta name=”description” content=”Learn all about HTML meta tags and how they improve SEO and page functionality.”>
<meta name=”keywords” content=”HTML, meta tags, SEO”>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<meta name=”author” content=”Jane Smith”>
<title>Understanding Meta Tags</title>
</head>
<body>
<h1>Welcome to the Meta Tag Tutorial</h1>
</body>
</html>
Importance of Meta Tags
– SEO: Meta tags, especially the description and keywords, help search engines understand the content of a page.
– User Experience: Tags like `viewport` enhance mobile responsiveness.
– Metadata: Provides additional information (author, charset) useful for browsers and search engines.