HTML SEO Essentials

Optimize your code to rank higher in search results and look professional on social media.

Content Structure & Indexing

Search engines act like readers. They look for clear headings and instructions on how to treat your page.

  • Proper heading structure : Using <h1> through <h6> in a logical order to create a content hierarchy.
  • Canonical URLs : The <link rel='canonical'> tag tells search engines which URL is the original source to avoid duplicate content penalties.
  • Robots meta tag : Used to tell crawlers if they should index the page ('index') or follow the links on it ('follow').
  • Sitemap basics : An XML file that lists all the important pages of your website to ensure search engines find them.

SEO Meta Tags

Essential head elements that tell search engines what the page is about and how to index it.

Social Media Optimization

When someone shares your link, you want it to look inviting. Meta tags control the preview image, title, and description.

  • Open Graph tags : Developed by Facebook to allow any web page to become a rich object in social graphs.
  • Twitter cards : Specific meta tags that allow Twitter to attach rich photos and videos to Tweets.
  • Meta description : A short summary of the page (approx. 155 characters) that often appears in search result snippets.

Social Media Optimization

Using Open Graph and Twitter Cards to control how links look when shared on social platforms.

Rich Results & Schema

Structured data helps search engines understand the 'type' of content you have, like a recipe, a review, or a product.

  • Schema.org : A collaborative effort to create a universal vocabulary for structured data on the web.
  • Structured data (JSON-LD) : A script-based format (recommended by Google) that provides explicit data to search engines.
  • Microdata : An older way of nesting metadata within existing HTML content using attributes like 'itemprop'.
  • Rich Snippets : The enhanced search results (stars, prices, images) that appear when you use structured data correctly.

JSON-LD Structured Data

Providing explicit information to search engines about the type of content on the page.

Knowledge Check

1. Which tag is used to prevent duplicate content issues by telling Google which version of a URL is the 'main' one?

2. Which protocol is used to control how a webpage looks when shared on Facebook or LinkedIn?

3. What is the primary purpose of the 'robots' meta tag?

4. Which format is currently recommended by Google for adding Structured Data (Schema.org)?

5. Why is proper heading structure (H1 through H6) important for SEO?

6. Which element provides the clickable headline in Google search results?