```yaml
product: AlterLab
title: "HTML — Web Scraping Glossary | AlterLab"
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/glossary/html
```

protocol

# HTML

HTML (HyperText Markup Language) is the standard markup language for structuring web page content, defining elements like headings, paragraphs, links, images, and tables.

HTML is the backbone of every web page. An HTML document is a tree of elements — the DOM — where each element is delimited by opening and closing tags (e.g., `<p>text</p>`) and can carry attributes that modify its behaviour or appearance (e.g., `<a href='...'>link</a>`). Browsers parse HTML into the Document Object Model and render it visually according to associated CSS stylesheets.

For web scrapers, HTML is the primary raw material. After fetching a page, the scraper parses the HTML to navigate the element tree and extract target data. Parsers like Python's BeautifulSoup, lxml, and Node's Cheerio expose CSS selector and XPath query APIs for locating elements by tag name, class, attribute, or structural position.

HTML is a fault-tolerant format: browsers are designed to render malformed HTML gracefully, and parsers similarly handle missing closing tags, unclosed attributes, and other violations. However, malformed HTML can cause selector queries to return unexpected results if the parsed tree differs from the visually rendered layout.

### What is HTML?

HTML (HyperText Markup Language) is the standard markup language for structuring web page content, defining elements like headings, paragraphs, links, images, and tables.

### How does AlterLab handle HTML?

HTML is a fault-tolerant format: browsers are designed to render malformed HTML gracefully, and parsers similarly handle missing closing tags, unclosed attributes, and other violations. However, malformed HTML can cause selector queries to return unexpected results if the parsed tree differs from the visually rendered layout.

## Examples

```
<!-- Basic HTML structure a scraper navigates -->
<article class="product-card" data-sku="ABC123">
  <h2 class="product-name">Widget Pro</h2>
  <span class="price">$49.99</span>
  <a href="/products/widget-pro">Details</a>
</article>
```

## Related Terms

[DOM (Document Object Model)The tree-structured programmatic representation of a web page that JavaScript manipulates to create dynamic content.](https://alterlab.io/glossary/dom)[CSS SelectorA pattern used to match HTML elements by tag, class, ID, or attribute, used in web scraping to extract specific nodes from parsed HTML.](https://alterlab.io/glossary/css-selector)[XPathXML Path Language — a query syntax for selecting nodes in HTML or XML using path expressions, more expressive than CSS selectors for complex traversals.](https://alterlab.io/glossary/xpath)[BeautifulSoupA Python library for parsing HTML and XML and navigating the parse tree using CSS selectors or tag methods.](https://alterlab.io/glossary/beautifulsoup)[Parse TreeThe hierarchical tree structure created by an HTML parser that represents the DOM elements of a web page for programmatic traversal.](https://alterlab.io/glossary/parse-tree)

## Extract HTML data from any website

AlterLab returns clean, structured data from any public URL — no scraper infrastructure needed. Start free, no credit card required.

[View API docs](https://alterlab.io/docs/api/rest)

[Back to Glossary](https://alterlab.io/glossary)