格 千格 KiloCell

HTML Turn Markdown Guide: Keep Structures, Links, Tables and Pictures

Update 2026-08-09 About 13 minutes Document Tool How-to

You need to move the CMS exported articles to Git, hand over the knowledge base page to the Markdown editor, or organize the titles, lists and tables on the web page into a readable document. Direct copying of a web page usually brings styles, scripts and invisible nodes, and handwritten writings easily omit links and pictures. The guide completes the structured conversion with a thousand cells HTML to Markdown tool and clearly separates "autogenerated" from "manual proofreading".

Use tools immediately Open HTML rotation Markdown converter
Open tool →

Make sure you have a clear target.

HTML turns Markdown is semantic downsizing: to keep the content structure, to discard most visual styles.

HTML can express any CSS, interactive and embedded components, and Markdown only covers headings, paragraphs, emphasis, lists, links, pictures, codes and limited tables. The converter should therefore be treated as the starting point for the migration, rather than the full recapitulation of the immediately seen gains. Page supports ATX title (#) or Setext Title (underlined form), also supported *、-、+ (b) Three unsequenced table tags; Select to be consistent with the repository's Markdown regulation.

Which structures can be retained and which will be lost

HTML Structure Common Markdown Output Move attention.
h1 Present. h6 # Present. ###### Title level may need to be re-organized
p、br Empty & Line Break Continuous br It doesn't have to be the same visual effect.
strong、em **、* The nesting device emphasizes checking for marking closure.
ul、ol - or 1. List Deep-seated encoder requires manual indentation
a Text Relative link and anchor point may fail
img !Alternative text Lazy load, size and CDN parameters to be reviewed
pre、code Fence code block Language identification is not always automatic.
table Markdown Table Merge cells, complex headers downgrade
script、style Usually, it's abandoned. It should still be checked for hidden content residue.

Before conversion, determine whether to "just text" or "to keep navigation and footnotes". The entire HTML often contains menus, cookies tips and recommended cards; It's a bad idea to put these together. The most reliable input is the HTML clips in the content area, not the entire web source code.

Step in the operation of KiloCell of pages

  1. Open HTML Turn Markdown Converter, confirm that the left is the HTML input area, and the right is the Markdown output area.
  2. Exports the content area from the browser developer tool or CMS, copying the real HTML. Do not paste the passwords, tokens, user information on the page.
  3. Selecting title style: Reservoir Universal # , select ATX; Setext is selected when the old document explicitly requires the underlined heading.
  4. Select the unserial symbol to keep the int rule of the existing repository. Different symbols mix to create meaningless diffs.
  5. Click " Start transformation " to first view the title, list, link, picture and code block and then copy the result.
  6. Use the Markdown previewer to render the output, and to check for clicks on the embedded list, table alignment and links.
  7. Convert relative URLs into the actual path of the warehouse or site; Confirms that the picture has an alternative text, code blocks added to the language identification.
  8. Deletes navigation, advertising, hiding text and repeating title, and then breaks lines with the HTML/Markdown formatting tool.

Tools use the Turndown logic in the browser to convert common nodes, which are suitable for small and medium-sized segments. It does not capture remote web pages, download pictures or judge the main content of the article for you. The input must be provided by you, and the output still needs to be reviewed.

Back and back: How a content card changes

Input HTML:

<article>
  <h2>部署Steps</h2>
  <p>FirstAnn.装 <strong>Node.js 20</strong>Again.Run <code>npm install</code>。</p>
  <ul><li>Ready.环境</li><li>RunTest</li></ul>
  <p><a href="/docs/start">ViewCompleteDocument</a></p>
</article>

Output Markdown may be:

## 部署Steps

FirstAnn.装 **Node.js 20**Again.Run `npm install`。

- Ready.环境
- RunTest

[ViewCompleteDocument](/docs/start)

Here is the structure and emphasis that is retained.article The packaging itself was omitted. If the target warehouse is deployed on the sub-routine,/docs/start This may need to be replaced with a relative path or complete URL; The converter will not know your release base path.

Manual review of forms, links and pictures

table. A simple rectangular table can be converted to Markdown;rowspan、colspan, multiline headers and HTML cells are regularly displayed. The semantic of the merged cell cannot be restored by matching spaces, and should be replaced by a list, subsection table or retention of the original HTML.

link. Text empty links, JavaScript links, download links and links with tracking parameters need to be handled separately. - Put it on. javascript:void(0) It's not only useless to write directly into Marktown, it's also likely to create security problems. Check case, end slash and anchor after internal link migration.

Picture. src It's probably just a place map. The real address is hidden. data-src; The converter can only see the properties in the input. Image sizes, lazy loads, ACCDNs and relative paths need to be manually repaired, and alternative text cannot be given a file name.

Code and Special Characters

among HTML &lt;、&amp; , the entity is restored to readable characters, but the text should be retained in the code example. Like what? <button> When you appear inside the code block, the Markdown output must remain inside the fence and cannot be used as an HTML tag.

<button type="submit">Save</button>

If the original is <pre><code class="language-js">...</code></pre>Language names usually help you to fill them up manually. `js 。 The converter does not necessarily recognize all class names and does not verify whether the code is operational. The migration should be followed by a formatting or testing tool for the corresponding language.

Error table: Successful conversion does not mean that the content is correct

Problem Common sources Method of repair
Output combination of navigation and advertising Entered whole page HTML Only copy the main contents container, or delete non-text nodes first
Heading Level Jump Original Station CSS transcoding Reorder h2/h3 by syntax, not only visual size
List to Continuous Text li The outer layer is incomplete. Completion ul/ol, convert and check indents
Table Column Wrong Merge cell or cell contains line breaks Change to a simple table or retain HTML
Pictures don't show. Relative URL, lazy load or rights of appreciation Replace with accessible URLs, add att and confirm permissions
Internal links 404 Release changes in base path Rewrite relative links and check batches according to site route
in code < interpreted as a label Not placed in code fence Use followed code block and specify language
Too many blanks or paragraph-linking Former HTML dependent CSS margin Recreate paragraphs with an empty Markdown line, do not copy style properties
Unvisible character after copying Free Text Clipboard Zero-wide Space Show invisible characters in the editor and clear them
XSS risk brought in Retain event properties or hazards URL Delete on* Properties, scripts and javascript: Link

At least one title, one nested list, one link, one picture and one code block are checked after each conversion. Structural losses cannot be detected by looking at the output length alone.

Real scene: four routes of document migration

CMS migrates to Git. Copy HTML from the article body container and convert it to an ATX title before submitting it to the repository. Move scripts to harmonize internal links and directories of pictures, and then let the Markdown previewer check through each page to avoid submitting the CMS recommended module.

Database of knowledge. The old system exports HTML with tables and footnotes. (a) Convert the main text and replace the footnote with the list of “references”; A small HTML section is maintained in the complex consolidated table to ensure that the information is not equiverted by error.

API rewrites the document. always include examples of HTML <code> and <pre>。 Converts to fills the code block with the language identifier and then runs the formatting device in the CI to ensure that the copied command does not change by decoded entity.

Web study notes. Only the selected content clips are kept and the original page URL and the date of the grab is recorded. The result of the conversion is used in personal notes and the entire copyrighted content should not be republished.

Security, copyright and privacy boundaries

  • Local converters reduce upload paths, but clipboards, download files and screen sharing may still leak internal documents.
  • The converter will not proactively execute input scripts; The output is still being used for HTML cleaning before being placed on the website, and Markdown cannot be considered natural security.
  • Delete javascript: Links, inline incidents and suspicious incidents; The URL of Markdown may still point to fishing stations.
  • Only what you have the right to copy and reissue. The web page rotation of Markdown does not automatically eliminate copyright, personal information or access control obligations.
  • Pictures and attachments may require login to access them. Pre-removal confirmation of licence, storage location and invalidity strategy.

FAQ

Can you enter a URL directly?

The current page is HTML text, which is not web-cafe. First, get the body HTML in a privileged environment, then paste the conversion; This also makes it easier to exclude navigation and advertising.

Why is the colour, font and layout of the CSS not kept?

Markdown primarily expresses the document structure, not the complete stylesheet. Colours and layouts belong to the CSS visual layer, which is usually discarded after conversion; If the information depends on the colour, it must be rewrited into text, icon or table.

What should be done with the complex forms?

First, to determine whether the reader needs to merge the cells. (b) If necessary, retain a small controlable HTML section; If not required, break it down into a few simple Markdown tables or defined lists to avoid converters producing false tables that are difficult to maintain.

Why does the relative link fail at the new site?

The link is older than the original page URL, and the directory level changes. Map internal paths to new route, fill the anchor and end slash rules, and request a state code in bulk.

Can conversion download remote pictures?

No, I won't. Output is usually reserved only src URL。 The accessibility of the pictures, the need for assurance and the need to move into their own storage are dealt with at the subsequent stage of asset relocation.

Markdown can continue embedding HTML?

Yes, many renders support a small amount of HTML. (b) The necessary scenes, such as forms, details folding, should be limited and the release system should be confirmed as being secure; Do not put the whole original station Dom back in Marktown.

List before publication

The main content precedes the entire page source code, the structure precedes the style, and the links and pictures are validated at the target site; Convert to make security cleansing, copyright confirmation and a Markdown preview. This move is made by maintaining documents rather than a hard-to-trace webshot.