Meta tags are HTML elements that provide metadata about a web page. They are not displayed on the page itself but are parsed by browsers, search engines, and social media platforms. Meta tags play a crucial role in search engine optimization (SEO) and social sharing. Here are some common meta tags used for SEO and social sharing:
1. **Title Tag:**
– The `<title>` tag defines the title of the web page, which appears in the browser’s title bar and as the clickable link in search engine results.
– It should be concise, descriptive, and relevant to the content of the page.
– Example:
“`html
<title>Page Title</title>
“`
2. **Meta Description Tag:**
– The `<meta>` tag with the `name=”description”` attribute provides a brief summary of the page content.
– It appears below the title in search engine results and influences click-through rates.
– It should accurately describe the page’s content and include relevant keywords.
– Example:
“`html
<meta name=”description” content=”Description of the page content”>
“`
3. **Meta Keywords Tag (Deprecated):**
– The `<meta>` tag with the `name=”keywords”` attribute used to specify keywords related to the page content.
– However, this tag is no longer considered by most search engines for ranking purposes and is often ignored.
– Example (deprecated):
“`html
<meta name=”keywords” content=”keyword1, keyword2, keyword3″>
“`
4. **Canonical Tag:**
– The `<link>` tag with the `rel=”canonical”` attribute specifies the preferred version of a URL when multiple versions of the same page exist.
– It helps prevent duplicate content issues and consolidates link equity to the preferred URL.
– Example:
“`html
<link rel=”canonical” href=”https://www.example.com/page”>
“`
5. **Open Graph Protocol (OGP) Tags:**
– OGP tags are used for social sharing on platforms like Facebook, Twitter, and LinkedIn.
– They define metadata such as title, description, image, and type for shared content.
– Example:
“`html
<meta property=”og:title” content=”Page Title”>
<meta property=”og:description” content=”Description of the page content”>
<meta property=”og:image” content=”https://www.example.com/image.jpg”>
<meta property=”og:url” content=”https://www.example.com/page”>
<meta property=”og:type” content=”website”>
“`
6. **Twitter Card Tags:**
– Similar to OGP tags, Twitter card tags enhance the appearance of shared content on Twitter.
– They include metadata such as title, description, image, and card type.
– Example:
“`html
<meta name=”twitter:card” content=”summary”>
<meta name=”twitter:title” content=”Page Title”>
<meta name=”twitter:description” content=”Description of the page content”>
<meta name=”twitter:image” content=”https://www.example.com/image.jpg”>
“`
By using these meta tags effectively, web developers can optimize their web pages for search engines, improve social sharing visibility, and enhance the overall discoverability and engagement of their content.