Complete examples of HTML rendering in the terminal with customization.
html/
βββ tags/ # Individual tag examples (abbr, code, input, etc.)
βββ tags-custom/ # Tags with extensive customization examples
βββ full/ # Complete HTML documents
βββ screenshots/ # Generated terminal screenshots
βββ README.md # This file
- Headers - h1-h6 with colors and custom markers
- Text Styles - bold, italic, underline, strike, mark, code
- Abbreviations - with custom title styles
- Variables - for programming variables
- Sample Output - for terminal/program output
- Code - Inline
with colors - Preformatted -
blocks with syntax highlighting
- Lists - ul, ol with custom markers and colors
- Definitions - dl, dt, dd for glossaries
- Tables - Tables with headers, captions, styling
- Blockquotes - Quotes with custom markers
- Horizontal Rules - Dividers with custom symbols
- Inputs - All input types (checkbox, radio, text, button, textarea)
- Fieldset - Form grouping with legends and borders
- Progress - Progress bars and meters
- Figure - Images with captions and borders
- Details - Collapsible sections with custom styling
- Address - Contact information
- Block Elements - div, section, article
- Links - Hyperlinks with custom colors
- Del/Ins - Deleted and inserted text
- Ruby - Asian language annotations
- Blog Post - Full blog article with rich content
- Documentation - API documentation style page
All examples in tags-custom/ demonstrate the full customization API using data-cli-* attributes.
<!-- Color -->
<p data-cli-color="red bold">Red bold text</p>
<p data-cli-color="bgBlue white">White on blue background</p>
<!-- Marker (for elements that have markers) -->
<h2 data-cli-marker="βΊ">Custom marker</h2>
<hr data-cli-marker="β" />
<h1 data-cli-color="red bold underline">Underlined header</h1>
<h2 data-cli-marker="βΆ" data-cli-color="cyan">Custom marker</h2>
<!-- Using HTML type attribute (disc, square, circle) -->
<ul type="disc">
<li>Disc marker (β’)</li>
</ul>
<ul type="square">
<li>Square marker (βͺ)</li>
</ul>
<ul type="circle">
<li>Circle marker (β¬)</li>
</ul>
<!-- Custom markers with data-cli-* attributes -->
<ul data-cli-marker="β" data-cli-marker-color="green" data-cli-color="blue">
<li>Colored text with custom markers</li>
</ul>
<ol data-cli-marker-color="red" data-cli-decimal=")">
<li>Custom decimal separator</li>
</ol>
<!-- Checkbox -->
<input type="checkbox" checked
data-cli-checked-color="green bold"
data-cli-checked-marker="β"
data-cli-unchecked-color="gray"
data-cli-unchecked-marker=" " />
<!-- Radio -->
<input type="radio" checked
data-cli-radio-checked-color="red bold"
data-cli-radio-checked-marker="β" />
<!-- Button -->
<button data-cli-button-text-color="green bold"
data-cli-button-open-marker="γ "
data-cli-button-close-marker=" γ">Click</button>
<!-- Text inputs -->
<input type="text" value="Success" data-cli-text-input-color="green bold" />
<!-- Textarea -->
<textarea data-cli-textarea-color="cyan">Content</textarea>
<progress value="70" max="100"
data-cli-filled-color="green"
data-cli-filled-marker="β"
data-cli-empty-color="gray"
data-cli-empty-marker="β"></progress>
<pre data-cli-color="yellowBright"
data-cli-numbers-enabled="true"
data-cli-numbers-color="gray dim">
<code>code with line numbers</code>
</pre>
<!-- Figure -->
<figure data-cli-border="blue"
data-cli-border-style="round">
<figcaption data-cli-color="green bold">Caption</figcaption>
</figure>
<!-- Fieldset -->
<fieldset data-cli-border="green"
data-cli-border-style="double"
data-cli-title-color="yellow">
<legend>Title</legend>
</fieldset>
<!-- Details -->
<details data-cli-border="cyan"
data-cli-marker="βΆ "
data-cli-border-style="round">
<summary>Summary</summary>
</details>
<abbr data-cli-color="cyan underline"
data-cli-title-color="yellow"
data-cli-title-prefix-marker="["
data-cli-title-prefix-color="gray"
data-cli-title-suffix-marker="]"
data-cli-title-suffix-color="gray"
title="HyperText Markup Language">HTML</abbr>
<img src="path.png" alt="Description"
data-cli-prefix-marker="!"
data-cli-prefix-color="cyan"
data-cli-open-marker="["
data-cli-close-marker="]"
data-cli-text-color="blue" />
tags-custom/code.html - Code snippets
tags-custom/pre.html - Code blocks with line numbers
tags-custom/samp.html - Terminal output
tags-custom/var.html - Programming variables
tags-custom/defs.html - Glossaries
tags-custom/abbr.html - Technical abbreviations
tags-custom/table.html - Data tables
full/blog.html - Complete article
tags-custom/input.html - All form controls
tags-custom/fieldset.html - Form organization
tags-custom/progress.html - Progress indicators
tags-custom/lists.html - Menus and navigation
tags-custom/headers.html - Document structure
tags-custom/lists.html - Hierarchical content
tags-custom/blockquote.html - Quotations
tags-custom/figure.html - Images with captions
tags-custom/details.html - Collapsible sections
All *-color attributes use chalk-string format:
Basic Colors: red, green, blue, yellow, magenta, cyan, white, black, gray
Bright Colors: redBright, greenBright, blueBright, yellowBright, magentaBright, cyanBright
Background: bgRed, bgGreen, bgBlue, bgYellow, bgMagenta, bgCyan, bgWhite, bgBlack
Modifiers: bold, dim, italic, underline, strikethrough
Combinations: "red bold", "bgBlue white bold", "yellow underline"
# Basic tag example
node bin/html.js examples/html/tags-custom/headers.html
# Full document
node bin/html.js examples/html/full/blog.html
# With custom theme
node bin/html.js examples/html/tags-custom/input.html
For visual examples of rendered HTML, see:
- Tags Screenshots - Individual HTML tags
- Tags Custom Screenshots - Custom styled tags
- Full Examples Screenshots - Complete HTML documents