Understanding SEO Basics
Search engine optimization, commonly called SEO, is the process of helping search engines understand webpages while creating useful, accessible content for the people who visit them.
HTML provides much of the structure search engines use to interpret a page. Descriptive page titles, headings, links, image alternatives, metadata, and meaningful document structure can make content easier to discover and understand without changing the information visitors see.
What Is SEO?
SEO is the practice of improving a website so search engines can discover its pages, understand their content, and determine when they may be useful to people searching for information.
SEO is not simply about placing keywords on a webpage. Search engines consider many signals when evaluating and presenting content, while the website itself needs clear organization, useful information, understandable HTML, and pages that work well for visitors.
The goal is not to write pages for a search engine instead of people. Good SEO helps search engines understand content that was created primarily to be useful to people.
How Search Engines Work
Search engines generally discover webpages, process their content, store information about eligible pages, and select results that may answer a person's search.
| Process | Description |
|---|---|
| Crawling | Automated programs discover webpages by following links, processing sitemaps, and using other discovery methods. |
| Indexing | The search engine processes a page and may store information about its content and resources in its search index. |
| Serving Results | The search engine selects and ranks results it considers useful and relevant to a particular search. |
Discovery does not guarantee indexing, and indexing does not guarantee that a page will appear prominently in search results. Search engines make their own decisions about which pages to index and display.
SEO and HTML
HTML gives webpage content structure and meaning. Search engines can use this structure along with the visible content and other signals to better understand what a page contains.
A well-structured document might begin with information such as:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Growing Tomatoes - Beginner Gardening Guide</title>
<meta name="description" content="Learn how to grow tomatoes with practical information about planting, sunlight, watering, support, and harvesting.">
</head>
<body>
<main>
<h1>Growing Tomatoes</h1>
...
</main>
</body>
</html>
The page title, description, heading, visible content, links, images, and overall structure work together to provide information about the page. No single HTML element is responsible for SEO.
Create Useful Page Content
Useful content is the foundation of SEO. A technically optimized page has limited value if it does not provide information that visitors actually need.
Pages should have a clear purpose and provide enough original information to satisfy that purpose. Content should be written naturally, organized logically, and use words that accurately describe the subject.
Think about the questions a visitor may have and whether the page answers them clearly. Search-friendly HTML supports good content; it does not replace it.
Page Titles
The HTML <title> element provides a title for the document and is an important source of information about the page.
<title>Growing Tomatoes - Beginner Gardening Guide</title>
Each important page should have a descriptive title that reflects its actual content. Avoid vague titles such as Home, Page 1, or the same title repeated across many unrelated pages.
Search engines may use the title when creating a search result, although they can generate different title text when they determine that another description better represents the page.
Meta Descriptions
A meta description provides a short summary of a webpage within the document's <head>.
<meta name="description" content="Learn how to grow tomatoes with practical information about planting, sunlight, watering, support, and harvesting.">
Search engines may use the description when creating the descriptive text shown with a search result, but they may instead select text from the page when it better matches a particular search.
A useful description accurately summarizes the page and gives a potential visitor a reason to choose the result. It should describe the actual content rather than being filled with repeated keywords.
Heading Structure
HTML headings organize visible content into understandable sections. A clear heading structure helps visitors scan a page and gives search engines additional context about how its information is organized.
<h1>Growing Tomatoes</h1>
<h2>Choosing a Location</h2>
<h2>Planting Tomatoes</h2>
<h2>Watering Tomato Plants</h2>
Headings should describe the sections they introduce. Do not choose heading elements merely because their default size matches the appearance you want; use CSS for visual styling and headings for document structure.
Descriptive URLs
Readable URLs can help visitors and search engines understand where a page belongs and what it contains.
https://www.example-web.site/gardening/growing-tomatoes.html
A descriptive URL is generally more understandable than an address made from unrelated numbers, codes, or unnecessary parameters.
https://www.example-web.site/page.php?id=48372
Keep URLs reasonably simple and stable. Changing established URLs unnecessarily can create broken links and require redirects to preserve access to the old addresses.
Internal Links
Internal links connect pages within the same website. They help visitors discover related information and provide paths search engines can use to find and understand other pages.
<a href="/gardening/watering-tomatoes.html">Learn how to water tomato plants</a>
Descriptive link text provides useful context about the destination. Avoid repeatedly using vague phrases such as click here when the link can naturally describe what the visitor will find.
A logical internal linking structure can also help communicate relationships between broad topics, detailed tutorials, reference pages, and related content.
Images and SEO
Images can contribute useful information to a webpage. Descriptive filenames, appropriate surrounding content, image dimensions, and meaningful alternative text can help browsers, search engines, and visitors understand them.
<img src="/img/images/tomato-plant.jpg"
alt="Tomato plant supported by a wire cage"
width="800"
height="600">
The alt attribute should describe the image according to its purpose on the page. It should not be filled with unrelated search terms or repetitive keywords.
Image optimization also includes practical performance considerations. Appropriately sized and compressed images can reduce unnecessary downloads and improve the experience of loading a webpage.
Technical SEO
Technical SEO includes website and document settings that influence how search engines access, interpret, and process pages. Several of these topics involve HTML directly.
Canonical URLs can indicate a preferred URL when substantially similar or duplicate pages are available at multiple addresses. Robots meta directives can control certain indexing and search-result behaviors, while structured data can provide machine-readable information about supported types of page content.
<link rel="canonical" href="https://www.example-web.site/gardening/growing-tomatoes.html">
These features are useful when they solve a specific problem, but they do not substitute for useful content, good site organization, or accessible HTML.
SEO and Accessibility
SEO and accessibility have different goals, but several good HTML practices benefit both. Clear headings, descriptive links, meaningful alternative text, semantic structure, and understandable page content can make information easier for people and machines to interpret.
Accessibility should never be treated merely as an SEO technique. Accessible HTML is important because people with different abilities and assistive technologies need to use the website.
The overlap is useful: creating well-structured pages for people often produces clearer information for search engines as well.
Avoid SEO Shortcuts
Attempts to manipulate search rankings can make a website worse for visitors and may violate search engine spam policies. Repeating keywords unnaturally, hiding text for search engines, creating low-value pages only to target search phrases, or using misleading links are not substitutes for useful content.
SEO recommendations also change as search engines improve. Techniques that once appeared useful may become ineffective or harmful, which is another reason to concentrate on durable practices such as useful content, understandable HTML, logical navigation, and good user experience.
Be especially cautious of anyone promising a guaranteed number-one search ranking. No outside developer or SEO service controls how a search engine ultimately ranks a webpage.
Best Practices
- Create useful, original content with a clear purpose.
- Use HTML elements according to their meaning and purpose.
- Give important pages descriptive and distinct page titles.
- Write accurate meta descriptions that summarize individual pages.
- Organize content with meaningful headings.
- Use readable, descriptive, and stable URLs.
- Create useful internal links with descriptive link text.
- Provide appropriate alternative text for informative images.
- Optimize images and other resources so pages load efficiently.
- Use canonical URLs, robots directives, and structured data when they have a specific purpose.
- Make content primarily for people rather than attempting to manipulate search engines.
- Follow current search-engine documentation instead of relying on outdated SEO tricks.
Summary
SEO helps search engines discover, understand, and appropriately present useful webpages. HTML contributes to SEO through page titles, metadata, headings, links, images, document structure, and technical information about the page.
Strong SEO begins with useful content and a website that works well for visitors. The remaining tutorials in this section examine the individual HTML and website features that can help search engines understand that content more clearly.
