Popular Searches
Popular Course Categories
Popular Courses

SEO-friendly markup

SEO-friendly markup

30 mins HTML5 & Semantic Markup

SEO-friendly markup in React JS

Course: React JS Training

Topic: SEO-friendly markup

Course Link: React JS Training

Demo Link: Register for a Course Demo


1. SEO-friendly markup: introduction and why it matters

Long before a human decides whether your page is useful, a machine has already visited it. Search engines send automated programs, usually called crawlers, that travel from link to link, download pages and read their HTML. They do not see your page the way a designer sees it. They see tags, text and structure. SEO-friendly markup is the practice of writing that HTML so clearly that a machine can understand what the page is about, which parts matter most, and how the content fits together.

This matters for every web project, and it matters double in a React training programme. Modern React development has moved toward a server-first style, where components are rendered on the server and pre-built HTML is sent to the browser. That trend exists precisely because the quality of the delivered HTML affects how quickly a page becomes visible and how easily machines can read it. If you only learn components and never learn what good HTML looks like, you will ship interfaces that no search engine can summarise correctly.

Three reasons to care early in your career

  • It costs nothing. SEO-friendly markup needs no tools or paid services. It is a set of writing and structuring habits you apply while you type.
  • It compounds. A page with a clear title, honest headings and meaningful text keeps working for you long after you wrote it.
  • It makes you a better frontend developer. The same habits that help search engines, semantic tags, logical headings, labelled media, also help screen readers, browser extensions and future teammates.

2. What SEO-friendly markup means in simple words

In one sentence: SEO-friendly markup is HTML written so that both people and machines understand it on the first read.

Think of a well-organised kitchen. Every jar has a label, similar items sit together, and the recipe book points you to the right shelf. A visitor can find anything quickly, and so can a new cook who has never seen the kitchen. A messy kitchen with unlabelled jars still contains the same food, but nobody can navigate it without opening everything.

A web page works the same way. You can build a page entirely out of generic <div> and <span> tags with clever CSS, and it may look perfect. But to a crawler it is a room of unlabelled jars: the words are there, yet nothing tells the machine "this line is the main heading", "this block is the navigation", "this picture shows the product". SEO-friendly markup adds those labels using the right tags, helpful metadata and clear text.

The three questions your markup must answer

  1. What is this page about? Answered by the <title>, the <h1> and the first paragraphs.
  2. How is the content organised? Answered by the heading hierarchy and semantic section tags.
  3. What do the non-text pieces mean? Answered by alt text on images, descriptive link text and structured data.

3. Key terms you will meet

These words appear in every SEO conversation. Learn them now and later documentation will read like plain English.

TermPlain meaning
Crawler (spider, bot)An automated program that follows links and downloads pages so the search engine can study them.
IndexingThe search engine storing an analysed copy of your page in its huge database so it can be shown in results.
RankingChoosing the order of results for a particular search query.
SnippetThe title, description and URL shown for your page on a results page.
<title>The HTML element that names the page. It appears in the browser tab and is the main headline of your snippet.
<meta name="description">A short summary of the page that search engines often show under the title.
Semantic tagsTags whose names describe their meaning, such as <article>, <nav> or <footer>.
Alt textThe alt attribute of an image, describing the image in words.
Canonical URLThe single address you declare as the "official" version of a page when it is reachable at more than one URL.
Structured dataMachine-readable labels (often JSON-LD) that describe facts about the page, such as its author or product price.
Heading hierarchyThe ordered use of <h1> to <h6> to build an outline of the page.

4. How search engines read a page, step by step

Understanding the reading process tells you exactly which markup choices matter and why.

  1. Discovery. The crawler finds your page, usually by following a link from another page it already knows, or from a sitemap you publish.
  2. Fetching. The crawler downloads the raw HTML document from your server.
  3. Parsing. The HTML is turned into a DOM tree, the same structure a browser builds. Tags, attributes and text become nodes.
  4. Rendering when needed. Modern search engines can execute JavaScript and see the final rendered page, but doing so is extra work and adds delay. Content that exists directly in the delivered HTML is the simplest and most reliable thing for a crawler to read. This is a key reason server-rendered HTML matters in modern React work.
  5. Signal extraction. The engine pulls out the title, meta description, heading structure, main text, image alt text, links and structured data.
  6. Indexing. The analysed content is stored, associated with the page's URL and with the topics the engine believes the page covers.
  7. Ranking. When someone searches, the engine compares the query against indexed pages and orders the results.

Notice steps 3 and 5. Both depend entirely on markup. A page whose meaning is buried in unlabelled boxes gives the engine weak signals; a page whose <title>, headings and semantic sections agree with each other gives strong, consistent signals.

5. The skeleton of an SEO-friendly document

Every well-marked page starts with a small set of elements in the <head>. Here is a complete, minimal skeleton you can reuse on any project:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Handmade Ceramic Mugs | Blue Pot Studio</title>
  <meta name="description"
        content="Small-batch ceramic mugs, glazed by hand in our studio.
                 Browse shapes, colours and prices with free local delivery.">
  <link rel="canonical" href="https://bluepot.example/mugs">
</head>
<body>
  <!-- the visible page content goes here -->
</body>
</html>

What each head element does for SEO

  • <!DOCTYPE html> and <html lang="en"> tell every program exactly which language and parsing rules to use. The lang attribute should match the page's real language.
  • <meta charset="utf-8"> prevents garbled characters in any language.
  • The viewport meta makes the page usable on phones. Search engines treat mobile friendliness as a baseline expectation, so this line belongs on every page.
  • The <title> is the single strongest on-page signal about the page's topic.
  • The meta description is your chance to write the sentence that appears under your title in results.
  • The canonical link declares the official URL of this content, protecting you from duplicate-page confusion.

Learn this skeleton once and you will never start a page from a blank guess again.

6. Titles and meta descriptions

The title and description are your shop window on the results page. Two pages can rank side by side, and the one with the clearer, more honest label usually wins the click.

Rules of thumb

  • Write a unique title and description for every page. Copy-pasted titles blur pages together.
  • Put the most important words near the beginning of the title.
  • Keep titles roughly in the 50–60 character range and descriptions around 150–160 characters; these are common guidelines because longer text tends to be cut off in results.
  • Write for humans first. A title stuffed with repeated keywords reads badly and helps nothing.
  • End the title with a site or brand name separated by a pipe or dash.
Weak titleStronger titleWhy
HomeBlue Pot Studio — Handmade Ceramics from Jaipur"Home" describes nothing; the strong version names the site and its subject.
Mugs, mugs, best mugs, buy mugsHandmade Ceramic Mugs | Blue Pot StudioKeyword stuffing reads badly and dilutes the signal.
Untitled documentSourdough for Beginners: A 7-Day ScheduleA missing title wastes the most valuable slot on the page.

The meta description does not need to be a sales pitch. One clear sentence about what the reader will find, plus one reason to click, is enough.

7. Headings that outline the topic

Headings from <h1> to <h6> exist to build an outline, exactly like chapters and sections in a book. A crawler (and a screen reader user) can read just your headings and should still understand the page's story.

Practical heading rules

  • Use exactly one <h1> per page, stating the page's main subject.
  • Do not skip levels, for example jumping from <h2> straight to <h4>. The outline should read as a clean tree.
  • Choose headings by meaning, not appearance. If a heading looks too big, change the CSS, not the tag.
  • Write headings that make sense on their own. "Introduction" is weak; "Why soak rice before dosa batter" tells the reader, and the engine, something.
<h1>A beginner's guide to sourdough starter</h1>

  <h2>What a starter actually is</h2>
  <h2>Creating your starter from flour and water</h2>
    <h3>Day 1 to 3: the quiet phase</h3>
    <h3>Day 4 to 7: feeding and bubbling</h3>
  <h2>Common starter problems and fixes</h2>

Read only the tags above and you already know the whole article. That is the test of a good heading outline.

8. Semantic tags instead of a sea of divs

A page built only from <div> and <span> is often called "div soup". It renders fine, but every box is anonymous. HTML5 semantic tags give each region a name, and those names are exactly the landmarks crawlers and assistive technology look for.

<!-- Weak: anonymous boxes -->
<div class="top">
  <div class="menu">...</div>
</div>
<div class="content">...</div>
<div class="bottom">...</div>

<!-- Strong: named regions -->
<header>
  <nav>...</nav>
</header>
<main>...</main>
<footer>...</footer>

The everyday semantic set

TagUse it for
<header>Introductory content for the page or a section: logo, site name, top navigation.
<nav>A block of major navigation links.
<main>The unique main content of the page. One per page.
<article>A self-contained piece: a blog post, a product card, a news item.
<section>A thematic grouping inside a page, normally with its own heading.
<aside>Indirectly related content: sidebars, tips, related links.
<footer>Closing information: contacts, copyright, small links.
<figure> and <figcaption>An image, chart or code sample together with its caption.
<time>A date or time, optionally machine-readable with the datetime attribute.

Semantic tags are not a ban on <div>. Use <div> freely for pure layout grouping when no meaning fits. The rule is simple: if a region has a meaning, name it; if it is only a styling container, a div is honest.

9. Images, media and descriptive text

Search engines cannot look at a photo and know what it shows. They read the words around it and the attributes you write on the tag.

<figure>
  <img src="/images/blue-mug-front.webp"
       alt="Glazed blue ceramic mug with a thumb rest on the handle"
       width="600" height="400"
       loading="lazy">
  <figcaption>The classic 300 ml mug in midnight blue glaze</figcaption>
</figure>

Habits that make media machine-readable

  • Always write alt text that describes the image's purpose: "Glazed blue ceramic mug with a thumb rest", not "IMG_2041". For purely decorative images, an empty alt="" is correct and intentional.
  • Use honest file names: blue-mug-front.webp beats DSC_0042.jpg.
  • Compress images and prefer modern formats such as WebP; heavy images are one of the most common reasons pages feel slow, and slow pages frustrate both visitors and crawlers.
  • Set width and height so the browser reserves space and the page does not jump while loading.
  • Use loading="lazy" for images that sit below the visible area, so the browser fetches them only when the reader gets close.

10. Links, anchor text and canonical URLs

Links are how crawlers discover pages, and your link text is a hint about the destination.

<!-- Weak anchor text -->
<p>To know about glazing, <a href="/glazing-guide">click here</a>.</p>

<!-- Strong anchor text -->
<p>Read our <a href="/glazing-guide">step-by-step glazing guide</a>.</p>

"Click here" tells both users and engines nothing. The destination's topic should be visible in the words you click.

Canonical URLs in one minute

Sometimes the same article is reachable at several addresses, for example with and without a tracking parameter. To a crawler those can look like duplicate pages. The canonical link in the <head> names the version you consider official:

<link rel="canonical" href="https://bluepot.example/mugs">

Every duplicate copy of the content should carry the same canonical line pointing at the one official URL.

11. Social previews and structured data

Two extra layers of markup make a page easier to understand outside the classic results list.

Social preview tags

Open Graph meta tags control the card shown when your link is shared in chats and social feeds:

<meta property="og:title" content="Handmade Ceramic Mugs | Blue Pot Studio">
<meta property="og:description"
      content="Small-batch mugs glazed by hand, with free local delivery.">
<meta property="og:image" content="https://bluepot.example/images/mugs-hero.webp">
<meta property="og:url" content="https://bluepot.example/mugs">

Structured data with JSON-LD

Structured data states facts about the page in a format machines parse without guessing. The usual format is a <script type="application/ld+json"> block in the head:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How to brew a balanced pour-over coffee",
  "author": { "@type": "Person", "name": "Meera Nair" }
}
</script>

Search engines use such labels to understand the page's subject and to decide whether the page qualifies for enhanced listings. The labels never replace good content; they confirm it.

12. Worked example: a complete blog post page

This short page combines every habit from the previous sections. Read it top to bottom and notice how each choice was made on purpose.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Pour-Over Coffee for Beginners | Brew Notes</title>
  <meta name="description"
        content="A calm, step-by-step pour-over method for beginners:
                 gear, grind size and a repeatable pouring rhythm.">
  <link rel="canonical" href="https://brewnotes.example/pour-over-basics">
  <meta property="og:title" content="Pour-Over Coffee for Beginners">
</head>
<body>
  <header>
    <nav>
      <a href="/">Brew Notes home</a>
      <a href="/guides">All brewing guides</a>
    </nav>
  </header>

  <main>
    <article>
      <h1>Pour-over coffee for beginners</h1>
      <p>Published <time datetime="2026-01-15">15 January 2026</time>
         by Meera Nair.</p>

      <h2>What you need</h2>
      <p>A dripper, filters, a scale and fresh beans are enough to
         start. See our <a href="/gear-guide">beginner gear guide</a>.</p>

      <h2>The pouring rhythm</h2>
      <h3>The first bloom</h3>
      <p>Wet the grounds and wait thirty seconds...</p>

      <blockquote>A steady pour beats a fast one every single time.</blockquote>

      <figure>
        <img src="/images/bloom-stage.webp"
             alt="Water bubbling over fresh coffee grounds in a dripper"
             width="600" height="400" loading="lazy">
        <figcaption>The bloom stage, thirty seconds after the first pour</figcaption>
      </figure>
    </article>
  </main>

  <footer>
    <p>&copy; Brew Notes. <a href="/about">About the writer</a></p>
  </footer>
</body>
</html>

What to notice

  • The <title>, <h1> and meta description all describe the same topic in different words, so the page's signals agree.
  • The body uses <header>, <nav>, <main>, <article> and <footer>, so every region is named.
  • The publication date is wrapped in <time>, the image has real alt text, and the link text names its destination.

13. Worked example: a product page for a small shop

A more realistic case: one product with navigation, specifications and reviews. This is the shape most e-commerce and portfolio pages take.

<main>
  <nav aria-label="Breadcrumb">
    <a href="/">Home</a> &gt;
    <a href="/mugs">Mugs</a> &gt;
    <span>Midnight blue mug</span>
  </nav>

  <article>
    <h1>Midnight Blue Ceramic Mug, 300 ml</h1>
    <p>A hand-thrown mug in a deep blue glaze, fired twice in our
       studio kiln. Each piece varies slightly in tone.</p>

    <figure>
      <img src="/images/blue-mug-front.webp"
           alt="Midnight blue ceramic mug on a wooden table"
           width="600" height="400">
      <figcaption>Front view, midnight blue glaze</figcaption>
    </figure>

    <h2>Specifications</h2>
    <table>
      <thead>
        <tr><th>Property</th><th>Value</th></tr>
      </thead>
      <tbody>
        <tr><td>Capacity</td><td>300 ml</td></tr>
        <tr><td>Material</td><td>Stoneware, food-safe glaze</td></tr>
        <tr><td>Dishwasher safe</td><td>Yes</td></tr>
      </tbody>
    </table>
  </article>

  <aside>
    <h2>What buyers say</h2>
    <p>"Keeps coffee hot longer than my old mug." &mdash; Ravi, Pune</p>
  </aside>
</main>

Why this markup earns its keep

  • The product description is inside <article> inside <main>, so its importance is unambiguous.
  • The breadcrumb links give crawlers the site's structure and give shoppers a way back.
  • Real specifications live in a real <table> with header cells, so the machine sees labelled data, not loose text.
  • Reviews sit in <aside>, clearly related to but separate from the product description.
  • A single <h1> names the product, and every other heading sits below it in a clean outline.

Nothing in these two examples is advanced or expensive. Every improvement is a plain tag, written in the right place, with honest words inside it. That is the whole discipline of SEO-friendly markup: say what you mean, in tags that mean what they say.

14. Going further: page-specific metadata on multi-page sites

Part 1 made a single page legible to machines. Real websites have dozens of pages, and the habits only pay off when every page carries its own identity. The classic failure is a template that copies one title across the whole site, so ten different pages all introduce themselves with the same words and compete with each other.

Use a title pattern, then vary the variable part

A title pattern keeps the brand fixed and lets the topic change from page to page:

<!-- Pattern: {specific page topic} | {site name} -->

<title>Handmade Ceramic Mugs | Blue Pot Studio</title>
<title>Glazing Workshops in Jaipur | Blue Pot Studio</title>
<title>Care and Repair of Stoneware | Blue Pot Studio</title>

Each title starts with that page's own subject and ends with the brand. Apply the same discipline to the meta description, and keep a simple record so duplication becomes visible at a glance:

PageTitleWhat the description must say
Product listingHandmade Ceramic Mugs | Blue Pot StudioWhat is sold, the range, and the delivery promise.
Workshop pageGlazing Workshops in Jaipur | Blue Pot StudioWho it is for and what a session covers.
Care guideCare and Repair of Stoneware | Blue Pot StudioWhat problem it solves and who should read it.

Notice the shape: the brand never changes, the topic always does. When a teammate opens your site map of titles, they should be able to name each page from its title alone.

15. Advanced usage: JavaScript-rendered pages and server rendering

Every example so far has been a plain HTML file, where the delivered document already contains the content. Modern applications often work differently: the server sends a thin HTML shell, and JavaScript running in the browser builds the interface afterwards. This approach is called client-side rendering.

A crawler can usually execute JavaScript and wait for the result, but that is extra work and extra delay, and if anything interrupts the rendering the crawler is left staring at the empty shell. Content that is already inside the first HTML response is simply the most dependable thing to publish. This is one of the reasons the React world has been shifting from client-heavy applications toward a server-first approach: recent React releases introduced Server Components, which render on the server and send pre-built HTML to the browser, so people and machines both receive meaningful markup immediately.

<!-- What a crawler may receive from a client-rendered shell -->
<body>
  <div id="root"></div>
  <script src="/app.js"></script>
</body>

<!-- What a crawler receives when HTML is rendered on the server -->
<body>
  <h1>Midnight Blue Ceramic Mug, 300 ml</h1>
  <p>A hand-thrown mug in a deep blue glaze, fired twice in our
     studio kiln.</p>
</body>
  • When a page must be found and understood by search engines, prefer delivering real content in the first HTML response.
  • Even inside a JavaScript application, make sure every route sets its own <title> and meta description. An app that shows one shared title on every screen has exactly the same problem as a template site with copied titles.

You will meet the React side of this properly later in the course. For now, hold on to the principle: the HTML that arrives first is the HTML that gets read first.

16. Real-world usage: crawl control and site-level helpers

Markup also lets you say no precisely. Three small tools cover most everyday needs.

  • The robots meta tag. Placed in the <head>, it tells search engines how to treat the page: index it or not, follow its links or not.
  • Link qualifiers. The rel attribute can mark a link as one you do not vouch for, which is common for links inside visitor comments.
  • A sitemap file. Not markup on the page itself, but a plain XML file on your site listing the URLs you want discovered. It works hand in hand with good markup: the sitemap says "these pages exist", the markup says "here is what each one means".
<!-- Keep a page out of the index, but let its links be followed -->
<meta name="robots" content="noindex, follow">

<!-- A link you do not vouch for, such as one in a reader comment -->
<a href="https://shop.example/teapot" rel="nofollow">
  Teapot shop mentioned by a reader
</a>

Use noindex deliberately and sparingly, for pages you would rather keep out of results, such as internal search result screens or the thank-you page shown after a form submission. Never put it on a page you want found, and remember to remove it when a page changes purpose.

17. Structuring content that search engines can lift

Beyond choosing tags, the shape of your content decides how easily a machine can quote it. Result pages often display a short extracted answer, and those answers come from pages where the answer is easy to locate.

  • Put a short, direct answer immediately under a question-style heading, then expand below it.
  • Use <ol> for genuine sequences and <ul> for genuine lists, not for paragraphs chopped up for looks.
  • Use real <table> markup for comparisons; labelled tables are far easier for a machine to read than the same facts in prose.
  • Keep each kind of text in its matching element: quotations in <blockquote>, commands in <code>, dates in <time>.
<h2>How long should the first bloom last?</h2>
<p>Thirty to forty seconds — long enough for the grounds to
   release trapped gas and for the surface to settle.</p>
<p>The exact time depends on roast and grind, so watch the coffee
   bed rather than the clock.</p>

The first sentence answers the heading; the rest adds nuance. A scanning reader gets the answer instantly, and a machine summarising the page gets a clean question-and-answer pair.

18. Common mistakes and the correct way

Each mistake below is one you will actually see in student projects. The wrong version and the right version sit side by side so the correction is obvious.

Choosing headings for their size

Mistake: picking a heading level because of how big it looks on screen. Correct way: pick the level the outline needs and adjust size with CSS.

<!-- Wrong: the outline skips a level -->
<h1>City cycling guide</h1>
<h3>Choosing a bike</h3>

<!-- Right: a clean outline, size handled by CSS -->
<h1>City cycling guide</h1>
<h2>Choosing a bike</h2>

Hidden keyword stuffing

Mistake: hiding keyword lists from people while leaving them for machines, for example with display: none or text coloured like the background. Correct way: either write the words visibly and usefully, or leave them out.

<!-- Wrong: text hidden from people, shown to machines -->
<p style="display: none">cheap mugs buy mugs best mugs</p>

<!-- Right: an honest, visible description -->
<p>Handmade stoneware mugs from 300 ml to 450 ml, glazed by hand.</p>

One title copied across the site

Mistake: the same <title> on every page, or no title at all. Correct way: a unique, specific title per page using the pattern from earlier in this part.

Useless alt text

Mistake: writing alt="image", repeating keywords, or pasting the file name. Correct way: describe the image's purpose in a few plain words — and use a deliberate empty alt="" when an image is purely decorative.

Generic link text

Mistake: strings like "click here" or "read more" repeated down a page. Correct way: name the destination in the link text itself, as in "read our step-by-step glazing guide".

Text baked into images

Mistake: putting a headline or a price inside a banner picture, where no machine and no screen reader can read the pixels. Correct way: keep real text in HTML and use the image, with its own alt, for what the picture actually shows.

A quick self-test for every mistake above: imagine explaining your page out loud to someone who cannot see it. Anything you would be embarrassed to say is a markup problem.

19. Best practices for everyday work

  • One page, one topic. Decide the subject before writing the title; let the title, the <h1>, the description and the opening paragraph all agree on it.
  • Write headings as an outline. One <h1>, no skipped levels, and headings that make sense read on their own.
  • Name every meaningful region. Semantic tags for everything with a meaning; <div> only for pure layout grouping.
  • Treat media as content. Descriptive alt text, honest file names, declared width and height, lazy loading below the fold, and compressed images in modern formats such as WebP.
  • Make links self-describing. The destination topic should be visible in the words you click.
  • Structure for answers. Direct answer under question headings, ordered lists for steps, tables for comparisons.
  • Add structured data only for what is really on the page. Labels confirm honest content; they never replace it.
  • Verify by reading the delivered HTML. Use your browser's view-source, not just the rendered screen, because that source is what a crawler fetches first.

20. Practical project: an SEO-ready recipe page, step by step

Build one complete, search-ready page using nothing but a text editor and a browser. Follow the steps in order; each one exists for a reason you have already met.

  1. Pick one topic and one search phrase. We will build a page for "easy paneer tikka recipe". One page, one subject, one phrase it deserves to be found for.
  2. Write the title and description first. Deciding them before the body forces you to be honest about what the page delivers.
  3. Lay down the head skeleton: character set, viewport, title, meta description and a canonical link.
  4. Build the body landmarks: <header>, <nav>, <main> and <footer>, with exactly one <h1>.
  5. Structure the content for answers: ingredients as a list, steps as an ordered list, and a short direct answer under a question-style heading.
  6. Add the photo properly: descriptive alt, declared dimensions, lazy loading.
  7. Add a small JSON-LD block describing the recipe in machine-readable form.
  8. Check the result: open the file, use view-source to see what a crawler sees first, and read the page by its headings alone.
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Easy Paneer Tikka Recipe | Kitchen Notebook</title>
  <meta name="description"
        content="A beginner-friendly paneer tikka: a ten-minute marinade,
                 a hot oven grill method and a smoky finish.">
  <link rel="canonical" href="https://kitchennotebook.example/paneer-tikka">
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Recipe",
    "name": "Easy Paneer Tikka",
    "description": "Beginner-friendly paneer tikka with a quick marinade.",
    "author": { "@type": "Person", "name": "Asha Verma" }
  }
  </script>
</head>
<body>
  <header>
    <nav><a href="/">Kitchen Notebook</a></nav>
  </header>
  <main>
    <article>
      <h1>Easy paneer tikka</h1>
      <p>Charred, spiced paneer cubes you can make in a home oven.</p>

      <h2>Ingredients</h2>
      <ul>
        <li>250 g paneer, cut into cubes</li>
        <li>Thick curd, ginger-garlic paste, garam masala</li>
      </ul>

      <h2>Steps</h2>
      <ol>
        <li>Mix the marinade and coat the paneer.</li>
        <li>Rest for ten minutes.</li>
        <li>Grill on skewers until the edges char.</li>
      </ol>

      <h2>How hot should the oven be?</h2>
      <p>Use the highest setting your oven offers, usually around
         220 to 240 degrees Celsius, preheated for ten minutes.</p>

      <figure>
        <img src="/images/paneer-tikka.webp"
             alt="Charred paneer tikka cubes on skewers over sliced onion"
             width="600" height="400" loading="lazy">
        <figcaption>Paneer tikka straight off the grill</figcaption>
      </figure>
    </article>
  </main>
  <footer>
    <p>&copy; Kitchen Notebook</p>
  </footer>
</body>
</html>

What you practised

  • A unique, front-loaded title and a one-sentence description written before the body.
  • A canonical link declaring the page's official address.
  • Semantic landmarks with a single <h1> and a clean heading outline.
  • The answer pattern: a direct reply sitting under a question heading.
  • Media habits: meaningful alt, fixed dimensions, lazy loading, WebP.
  • A minimal structured-data block that states only facts present on the page.

21. Practice Exercises

  1. Open an article you admire, read only its heading tags from <h1> to <h3>, and write down the outline you can infer. Then rewrite two headings that carry no information on their own.
  2. Find or invent three keyword-stuffed titles and rewrite each as an honest, front-loaded title of about 50 to 60 characters.
  3. Take five images from any public page and write proper alt text for each; decide which of them, if any, should actually carry alt="".
  4. Take a page you built in an earlier sub-module and replace three anonymous <div> blocks with semantic tags wherever real meaning exists. Note what changed and what correctly stayed a <div>.
  5. Write a JSON-LD block for a page about a local business or an article of your choice, describing only facts that genuinely appear on the page.
  6. Find a page you can reach at two different addresses and write the canonical line that names the official version.

22. Interview Questions and Answers

What is SEO-friendly markup?

HTML written so that both people and machines understand it on the first read: a clear title, an honest heading outline, semantic tags for meaningful regions, descriptive alt and link text, plus metadata and structured data that state what the page is about.

Why does semantic HTML help SEO?

Semantic tags such as <article>, <nav> and <main> give each region a recognised name. A crawler parsing the DOM then knows which block is the primary content and which is navigation, instead of having to guess from anonymous boxes.

What does the title element do, and what makes a good one?

It names the page, appears in the browser tab and forms the headline of the result snippet. A good title is unique per page, puts the specific topic first, reads naturally for humans and ends with the site or brand name.

Does the meta description affect ranking?

Its main job is to earn the click: it is the summary shown under the title. Search engines may also choose their own snippet from page content, so the description should accurately summarise the page rather than try to manipulate it.

How many h1 elements should a page have, and why?

One. The <h1> states the page's single main subject, and the remaining headings from <h2> downward build the outline beneath it without skipping levels.

What is alt text, and when is an empty alt attribute correct?

Alt text describes an image in words for machines and for users who cannot see the image. An empty alt="" is correct for purely decorative images, because it tells assistive technology there is nothing to announce.

What is a canonical URL and when do you need one?

It is the address you declare as the official version of a piece of content, using a link rel="canonical" element. You need it when the same content is reachable at more than one URL, so the pages do not look like duplicates.

How do crawlers handle JavaScript-heavy pages?

Modern crawlers can execute JavaScript and see the rendered result, but rendering is extra work and adds delay, and failures leave only an empty shell visible. Content present in the first HTML response is the most reliable to publish.

How do React Server Components relate to SEO?

Server Components render on the server and send pre-built HTML to the browser, which fits the industry's shift from client-heavy to server-first applications. The practical SEO benefit is that meaningful markup arrives in the first response instead of depending on browser-side rendering.

What is structured data used for?

It states facts about a page in a machine-readable format, usually a JSON-LD script block with a shared vocabulary. It helps engines understand the page's subject and decide whether it qualifies for richer result displays, and it must describe only what is really on the page.

What is rel="nofollow" for?

It marks a link as one you do not vouch for, such as a link inside a visitor comment. Related values distinguish paid links from user-generated links, letting you qualify links instead of removing them.

A page is not appearing in search results. What do you check first?

Start with the markup you control: is there a unique <title> and description, is a noindex robots meta tag accidentally present, does the canonical point to the right address, and does the actual content exist in the delivered HTML rather than only after JavaScript runs.

23. Quick Revision Checklist

  • SEO-friendly markup means HTML that people and machines both understand on the first read.
  • Crawlers fetch HTML, parse it into a DOM, and prefer content present in the first response.
  • Every page gets a unique title, a unique description and a canonical link.
  • One <h1> per page; no skipped heading levels; headings must make sense alone.
  • Semantic tags name regions: <header>, <nav>, <main>, <article>, <section>, <aside>, <footer>.
  • Every image has meaningful alt text, or a deliberate empty alt="".
  • Images are compressed, in modern formats, with width, height and lazy loading.
  • Link text names the destination; "click here" helps nobody.
  • Direct answer under question-style headings; steps in <ol>; comparisons in <table>.
  • Structured data describes only facts that exist on the page.
  • noindex and rel="nofollow" are deliberate, sparing tools.
  • Server-rendered HTML, as in React's server-first direction, gives machines meaningful markup immediately.
  • Verify with view-source, and read the page by headings alone as a final test.

24. Official Documentation and Further Reading

These readings connect this page's markup habits to the React work you will do next in the course:

Conclusion

SEO-friendly markup is not a separate discipline bolted onto web development. It is the same habit you have practised across this module: say what you mean, in tags that mean what they say. A page with an honest title, a clean heading outline, named regions and described media serves the crawler, the screen reader, the slow connection and the future teammate all at once.

Carry the principle forward as you move into CSS and then React. Styling will change how your pages look, and components will change how they are built, but the contract between your markup and every machine that reads it stays the same. The developers who write the clearest HTML are the ones whose React applications are easiest to render, easiest to optimise and easiest to find.

Learn more in the React JS Training course, or register for a course demo.

Previous Next
whatsapp