# pup
> Parsing HTML at the command line

## Summary
Command-line HTML parser that uses CSS selectors to extract data from HTML documents, like jq but for HTML.

## Capabilities
- Parse HTML using CSS selectors
- Extract text, attributes, and elements from HTML
- Format output as text, JSON, or HTML
- Read from stdin for pipeline integration

## When to Use
- User needs to extract data from HTML documents
- User wants CSS selector-based HTML querying
- User needs HTML parsing in shell pipelines

## When NOT to Use
- User prefers XPath over CSS selectors
- User needs full web scraping with JavaScript rendering

## Related Tools
- [jq](/tools/jq) (complementary): jq is for JSON what pup is for HTML

---
Source: https://littlescripts.sh/tools/pup
