browserlane
CLI referenceInspect page

bl html

Get HTML content of the page or an element

Get HTML content of the page or an element

Usage

bl html [selector] [flags]

Flags

FlagDescription
--outerReturn outerHTML instead of innerHTML

Global flags

FlagDescription
--headlessHide browser window (visible by default)
--jsonOutput as JSON
-v, --verboseEnable debug logging

Examples

bl html
# Get full page HTML

bl html "div.content"
# Get innerHTML of a specific element

bl html "div.content" --outer
# Get outerHTML of a specific element

bl html https://example.com "h1"
# Navigate then get element HTML