//
Convert raw HTML code, web page articles, and rich text into clean, human-readable GitHub Flavored Markdown (GFM) with table and code block support.
Converting HTML markup into clean Markdown relies on DOM tree traversal and semantic element transformation:
<h1>–<h6> elements to corresponding #–###### Markdown heading tokens and <p> blocks into double-newline separated paragraphs.<strong> and <b> to **bold**, <em> and <i> to *italic*, and <del> / <s> to ~~strikethrough~~.<a href="url">text</a> into [text](url) and <img src="url" alt="text"> into .<table>, <thead>, <tr>, <th>, and <td> trees and generates clean pipe-delimited GFM tables (| Header 1 | Header 2 |) with alignment markers.<pre><code> blocks into fenced code blocks with language annotations.<script>, <style>, and <noscript> elements to prevent code pollution in Markdown outputs..md files for Astro, Next.js, and Gatsby..md file.<table> elements into formatted pipe-delimited Markdown tables.<pre><code> blocks into fenced triple backtick code blocks.<script>, and <style> blocks.[text](url)) and image sources ()..md file download actions.Scenario: Migrating a blog post from a CMS into a Markdown file.
<h2>Getting Started</h2><p>Welcome to our <strong>developer guide</strong>. Check the <a href="https://example.com/docs">documentation</a>.</p>
## Getting Started Welcome to our **developer guide**. Check the [documentation](https://example.com/docs).
Transforms HTML headings, bold tags, and links into clean Markdown.
Scenario: Transforming an HTML data table into a Markdown table.
<table><tr><th>Name</th><th>Role</th></tr><tr><td>Alex</td><td>Admin</td></tr></table>
| Name | Role | | --- | --- | | Alex | Admin |
Converts table rows and headers into pipe-delimited GFM markdown.