HTML and text guides

Extract a plain-text notice from HTML

·

A trail notice needs a text-only copy for a support email. Keep the steps and opening times readable after removing the site markup. Use the saved HTML alongside the result to check the wording and order.

HTML to Plain Text

Check the notice in plain text

Open HTML to Plain Text and select Load example, then Extract text. The first line reads Trail notice. The next paragraph starts Le café & water station and keeps both the accent and the decoded ampersand.

The list starts at 3, following the source's start attribute. Ask at reception is indented below Pick up a map. The fourth step contains افتتاح المسار. Its letters stay in logical Unicode order while the browser or your text editor chooses how to display the right-to-left segment.

WHATWG HTML, rendered text and innerTextW3C Internationalization, setting text direction in HTML

Choose Pipes under Table separator and Extract text again. Read Gate | Opens and East | 08:00 on separate lines. Tabs are also available when you need a tab-separated layout for another tool. Each source cell makes one column, so review any row or column spans after extracting your own table.

Change Links to Labels and addresses. After rerunning extraction, the last line reads Route details (/route). This path came from the saved markup. To share it outside the site, supply the full address separately.

Change Headings to Markdown heading markers to turn the first line into ## Trail notice.

WHATWG HTML, table data cells and spansWHATWG HTML, rendered text and innerText

Save the text and compare it with the source

Download extracted.txt, open it as UTF-8 and compare the key lines in the notice. The HTML source stays in place, so you can change a conversion option and compare again.

Extraction follows the saved HTML tree. CSS visibility rules, layout and scripts can change what a browser shows. Check the rendered page separately if you need to match that display.

WHATWG HTML, rendered text and innerTextW3C Internationalization, setting text direction in HTML

Common questions

Does the text include hidden elements?

The extractor skips elements with the HTML hidden attribute and several non-content elements, including scripts and styles. It does not compute visibility from CSS.

Why did the numbered list start at 3?

The example uses an ordered list with a start value of 3. List item values and reversed ordering can also change the displayed numbering.

Sources

Put it into practice.

Related guides