# SEO and Metadata Basics

> Help search engines and social platforms understand your pages with titles, meta descriptions, structured data and crawlable markup. Free notes, key concepts,...

Canonical: https://www.internhack.in/roadmaps/tracks/frontend/seo-basics
Last updated: 2026-11-28

Help search engines and social platforms understand your pages with titles, meta descriptions, structured data and crawlable markup.

Beginner · about 2 hours · difficulty 1/5

Learn first: [Semantic and Accessible HTML](https://www.internhack.in/roadmaps/tracks/frontend/semantic-html)

Search engine optimisation for developers is mostly about not getting in the way. Good content wins, but broken technical foundations can hide good content completely.

### What you control in markup

- A unique, descriptive `<title>` and `<meta name="description">` per page.
- One clear `<h1>` and semantic structure; crawlers use headings and landmarks too.
- **Canonical URLs** (`<link rel="canonical">`) to avoid duplicate-content confusion.
- **Open Graph** and Twitter card tags (`og:title`, `og:image`) control link previews in chat apps and social feeds.
- **Structured data** in JSON-LD (schema.org types like `Article`, `Product`, `JobPosting`) can unlock rich results.
- Real `<a href>` links, because crawlers follow hrefs, not click handlers.

### Site-level concerns

- `robots.txt` and `sitemap.xml` tell crawlers what to fetch.
- Fast, mobile-friendly pages rank better; Core Web Vitals are a ranking signal.
- **Client-side rendering risk**: if content only appears after JavaScript runs, some crawlers and most link-preview bots will see an empty page. This is one of the main reasons server rendering and static generation exist.

### Good enough to move on

Your pages have correct titles, descriptions, social previews that render when you paste the link into a chat app, and a sitemap. Deeper SEO (keyword research, link building) is marketing work, not a frontend prerequisite.

## Key concepts

- **Title and meta description**
- **Canonical URLs**
- **Open Graph and social cards**
- **Structured data (JSON-LD)**
- **robots.txt and sitemaps**
- **Crawlability of client-rendered pages**

## Mini project

Add complete metadata, Open Graph tags, a JSON-LD Person or Article block and a sitemap to your profile page, then verify the social preview and run Google's Rich Results Test.

## Check yourself

Why might a purely client-rendered page show an empty preview when its link is shared?

## Free resources

- [SEO Starter Guide](https://developers.google.com/search/docs/fundamentals/seo-starter-guide) (Google Search Central)
- [The Open Graph protocol](https://ogp.me/)

Previous: [HTML Forms and Native Validation](https://www.internhack.in/roadmaps/tracks/frontend/html-forms) · Next: [Selectors, Specificity and the Cascade](https://www.internhack.in/roadmaps/tracks/frontend/css-cascade)

## More in Writing Meaningful HTML

- [HTML Document Essentials](https://www.internhack.in/roadmaps/tracks/frontend/html-document)
- [Semantic and Accessible HTML](https://www.internhack.in/roadmaps/tracks/frontend/semantic-html)
- [HTML Forms and Native Validation](https://www.internhack.in/roadmaps/tracks/frontend/html-forms)
- [SEO and Metadata Basics](https://www.internhack.in/roadmaps/tracks/frontend/seo-basics)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Frontend Developer Roadmap](https://www.internhack.in/roadmaps/tracks/frontend)
