Here is exactly how each HTML element is translated to Markdown:
<h1>: a level-1 heading becomes #. Example: <h1>Routes</h1> → # Routes.
<h2>: a level-2 heading becomes ##. Example: <h2>Routes</h2> → ## Routes.
<h3>: a level-3 heading becomes ###. Example: <h3>Routes</h3> → ### Routes.
<h4>: a level-4 heading becomes ####. Example: <h4>Routes</h4> → #### Routes.
<h5>: a level-5 heading becomes #####. Example: <h5>Routes</h5> → ##### Routes.
<h6>: a level-6 heading becomes ######. Example: <h6>Routes</h6> → ###### Routes.
<p>: paragraphs become plain Markdown paragraphs separated by a blank line. Example: <p>Hello</p> → Hello.
<strong> / <b> and <em> / <i>: bold text becomes **text** and italic text becomes *text*. Deleted or struck text (<del>, <s>, <strike>) becomes ~~text~~.
<a> and <img>: links become [link text](https://example.com) and images become , each keeping its title attribute when present.
<ul> and <ol>: bullet lists become - item lines and numbered lists become 1. item lines, with nested lists indented by four spaces per level.
<blockquote>: quoted paragraphs are prefixed with > on every line.
<table>: tables are converted to pipe-delimited Markdown tables with a --- header separator row.
<code> and <pre>: inline <code> becomes backtick `code`, while a <pre> block becomes a fenced code block ``` and keeps its language tag (for example class="language-javascript" → ```javascript).
<hr> and <br>: horizontal rules become --- and line breaks become Markdown line breaks.
Other containers: structural wrappers such as <div>, <section>, <article>, <header> and <footer> are unwrapped and their contents converted normally. HTML comments are dropped, and any HTML entities are automatically decoded to the characters they represent.