HTML annotation for web content extraction

Show content extraction models which text belongs to the page's main content and which text belongs to navigation or promotions. Label source spans and article metadata in rendered HTML snapshots with human review.
Editorial HTML collage with main content and metadata labels

Separate useful content from surrounding page text

Build clear examples for content extraction across articles, guides and editorial webpages while preserving the source context.
Article main-body text selected within a rendered HTML source

Main-body text

Mark the visible paragraphs that belong to the article or guide. Use consistent boundaries so the selected text includes the intended content without neighboring navigation or promotions.
Main content and excluded navigation text shown as separate source spans

Boilerplate exclusion

Label visible navigation, subscription prompts and other excluded text separately from the main content. Define the inclusion rule in the project instructions for ambiguous page sections.
Article title author and publication date as separate HTML entities

Article metadata

Identify the title, author and publication date where they appear in the rendered page. Distinguish the article's own metadata from related-story cards or footer text.
A corrected content span includes the complete sentence

Content-boundary review

Review the beginning and end of selected content against the original page. Correct truncated sentences, included promotional copy or the wrong text occurrence before approving an example.

Why AI Teams Choose Unitlab

Bring HTML source context, shared ontologies, human review and dataset delivery into one workflow for your training data team.
15X
Faster HTML Annotation
60%
Free Up AI Engineers’ Time
5X
Lower AI Development Costs

Annotation types for web content extraction

Pair non-overlapping content spans with page-level properties that describe the source and task.
Precise non-overlapping text-span labels on an editorial webpage

Content and metadata spans

Label one contiguous visible-text range at a time for body content or metadata. Keep labels non-overlapping, using the project's boundary rules to separate adjacent text roles.

Page-level properties

Classify the whole HTML item with properties such as Page type or Language while retaining its internal text annotations. These values describe the saved source page.

HTML page classification alongside internal text annotations

Web Content Extraction FAQs

What is web content extraction annotation?

It identifies the page text an extraction system should retain and the surrounding text it should exclude. Reviewed labels for body content, metadata and boilerplate help teams build training and evaluation data for web content extractors.

Why annotate rendered HTML instead of plain text?

The rendered snapshot preserves contextual cues such as headings, columns, article sections and nearby recommendations. Annotators still label visible text spans, while the page presentation helps them decide which text belongs to the extraction target.

What counts as main content or boilerplate?

The project guidelines define the rule for each source type. Article paragraphs usually belong to main content; navigation or subscription prompts often do not. Treat comments, captions and related links explicitly so annotators apply the same policy.

Can I label a whole body and nested fields at the same time?

HTML entity ranges are contiguous and non-overlapping. Choose a span scheme that avoids labeling the same characters twice. Use item properties for whole-page classifications while keeping the internal content and metadata spans separate.

Can I annotate article titles, authors and dates?

Yes. Create distinct entity classes and select the visible source text for each field. Review surrounding context so an author or date from a recommendation is not mistaken for the current article's metadata.

Can I classify the page as an article or guide?

Yes. Configure an item property for Page type or another whole-page category. It describes the complete saved HTML item while entity annotations label individual text ranges inside it.

Does Unitlab fetch or clean live websites automatically?

This solution labels uploaded .html or .htm snapshots. It does not crawl the live web or automatically remove boilerplate. Reviewed annotations provide examples that a downstream extraction or cleaning system can use.

How should teams review content boundaries?

Inspect the selected text in the rendered page, check complete sentences and adjacent sections, and compare ambiguous cases with the instructions. Use contextual comments and review/rework to correct missing content or included boilerplate.

Can I export labels for content-extraction evaluation?

Yes. HTML supports JSONL and Unitlab Unified Export Format with supported source identity, text anchors, entity labels and properties. Adapt the reviewed outputs to the input and evaluation contract of your own content-extraction pipeline.