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.