Adding Meta Tags for SEO
Search Engine Optimization (SEO) is the practice of increasing the quantity and quality of traffic to your website through organic search engine results. Using HTML meta tags correctly is a foundational step in any SEO strategy.
When search engine bots crawl your page, they don't visually "see" the page like a human does. Instead, they read your HTML code, including any meta tags you've added. Meta tags explicitly tell these bots what your page is about.
The Title Tag
While technically not a meta tag, the title tag is possibly the single most important SEO element on your page. This is the large, clickable blue link that appears in Google search results. It should be unique and relevant to the page content. It should provide the user with a clear indication of what the page is about.
When adding the title tag to your HTML document, it must be placed inside the head element:
The Meta Description
The description meta tag provides a short summary about your page. Search engines will often display this summary in the search results. A good description increases the chance that a user will actually click your link. Note that it does not show up anywhere visually on your actual webpage.
Here's an example of a meta description:
Other Common Meta Tags
Historically, the keywords meta tag was heavily used to list words related to the page. Today, major search engines like Google largely ignore it, but it doesn't hurt to include it for smaller, specialized search directories:
Full Working Example
Below is a skeletal HTML document demonstrating exactly where all these tags belong. Because meta tags are read by machines, they must always be placed securely inside the head element, before the visible body element begins: