Using the Markdown Previewer
The Markdown Previewer previews a small Markdown subset as HTML. The field is labeled Markdown. It starts as a line # Hi, a blank line, and Hello. Choose Preview Markdown. The label above the headline reads Preview. The headline is HTML preview. The text is exactly <h1>Hi</h1> then a newline then <p>Hello</p>. The Characters line is 24, which is the length of that HTML. Raw HTML in the source is escaped. This is a preview of the text you typed, not a saved document.
The about line says headings use one to three # marks, a line that starts with - and a space is a list item, and **bold**, *italic*, and `code` work inside a line. The steps under the result say to escape raw HTML, turn headings, lists, and paragraphs into tags, and show the HTML as a preview. A line that starts with * and a space is also a list item. The sample uses one # mark, so the first block is an h1 whose text is Hi. Hello is a paragraph.
Before you choose Preview Markdown, the headline reads Enter Markdown and the label reads Result. Empty text, or text longer than 20000 characters, is refused with Enter from 1 to 20000 characters. If the conversion leaves no text, the page says Enter Markdown that still has text. Reset returns the field to the line # Hi, the blank line, and Hello, the headline to Enter Markdown, and the label to Result. Copy result copies the HTML. The Markdown Editor is a separate page, and its headline for these lines is 3.
What the HTML Preview Contains
The headline is the words HTML preview on every successful run. The label reads Preview. The text is the HTML, and the Characters line is 24. That 24 counts the tags, the letters Hi, the letters Hello, and the newline between the two blocks. It does not count the Markdown source. The source is a line # Hi, a blank line, and Hello. Written as tags, the text is <h1>Hi</h1> then a newline then <p>Hello</p>. Raw HTML in the source is escaped. The sample has no raw tags, so nothing in it is escaped.
The useful record is the text, not the headline alone. HTML preview names the kind of result. The h1 and the paragraph are in the text. Copy result copies that text. The steps stay in order: escape raw HTML, turn headings, lists, and paragraphs into tags, and show the HTML as a preview. This is a preview of the text you typed. The page does not save the document.
An error headline means there is no HTML to read, and the text and the lines are cleared. Enter from 1 to 20000 characters covers an empty field and a paste longer than 20000 characters. Enter Markdown that still has text covers a conversion whose text content is empty. The sample is neither case. Its Characters line is 24, and its headline is HTML preview.
A dash list is a different preview with the same headline. The lines - a and - b become <ul><li>a</li><li>b</li></ul>, and Characters for that list is 29. The headline is still HTML preview. The label is still Preview. Restore the line # Hi, the blank line, and Hello before you quote Characters 24.
How # Hi and Hello Become HTML
The first line is # Hi. One mark, a space, and Hi make an h1 whose text is Hi. The blank line ends any list, and the sample has no list yet. Hello is not a heading and not a list item, so it becomes a paragraph. The text is <h1>Hi</h1> then a newline then <p>Hello</p>. Characters is 24. Removing the blank line still leaves an h1 and a paragraph, because each of those lines has its own rule. The blank line is how a list closes. The steps still escape raw HTML first.
Interest on a principal is a different product. The Simple Interest Calculator multiplies principal by an annual percent and by years. A principal of 1000 at 5 percent for 2 years earns interest of 100 and a total of 1100. The headline there is the interest. That page does not preview Markdown as HTML. Use it when the sample principal of 1000 should earn interest of 100. Use this page when # Hi and Hello should return the headline HTML preview and Characters 24.
A Preview of the Text You Typed
This is a preview of the text you typed, not a saved document. The page does not fetch a page, open a file named in the Markdown, or apply a stylesheet. The result has no document type, no head, and no style block. It is the fragment the subset can build. You chose the lines. The page escaped raw HTML, turned # Hi into an h1, turned Hello into a paragraph, and counted 24 characters.
From the Sample Lines to Characters 24
Leave the field as the line # Hi, a blank line, and Hello. Choose Preview Markdown. The headline is HTML preview. The label reads Preview. The text is <h1>Hi</h1> then a newline then <p>Hello</p>. The Characters line is 24. Choose Preview Markdown again. The figures match. Change the first line to ## Hi. The block is an h2, and the paragraph Hello remains. Restore one # mark and confirm Characters is 24 again.
A compounded amount is a different figure. The Compound Interest Calculator compounds a principal at an annual percent. A principal of 1000 at 5 percent, compounded 1 times a year for 1 years, is 1050. The interest line there is 50. The headline there is the amount. That page does not turn # Hi into an h1. Use it when the sample principal of 1000 should become 1050. Use this page when the text should be the h1, the paragraph, and Characters 24.
Previews That Miss the h1
A common miss is to omit the space in # Hi. #Hi is a paragraph. Another miss is four marks and an expected h4. The subset is one to three marks, so #### Four is a paragraph. Another miss is to expect a typed tag to stay live. Raw HTML in the source is escaped. Another miss is to expect the blank line to be required between # Hi and Hello. Each line converts on its own. The blank line closes a list. Another miss is to read Characters 24 as the length of the Markdown. It is the length of the HTML, tags included.
A comparison that does not pick a base is a different percent. The Percentage Difference Calculator uses the absolute difference divided by the average of the absolute values, times 100. The absolute difference of 40 and 50 is 10. The average of the absolute values is 45. The percentage difference is 22.22. That page does not preview Markdown. Use it when you are comparing 40 and 50. Use this page when # Hi and Hello should return Characters 24.
Keeping the HTML and the Character Count
Copy the text. For the sample it is <h1>Hi</h1> then a newline then <p>Hello</p>. The Characters line is 24. The headline is HTML preview, and the label is Preview. A note that says only HTML preview can be any later run. The text and the Characters line name this one. Copy them before you reset. Reset returns the headline to Enter Markdown, the label to Result, and the field to the sample lines. The text and the Characters line are cleared.
A margin from revenue and cost is a different percent. The Profit Margin Calculator subtracts cost from revenue and divides that profit by revenue. Revenue of 200 and cost of 150 give profit of 50 and a margin of 25 percent. The headline there is the margin percent. That page does not build an h1 from # Hi. Use it when the inputs are revenue and cost and the sample margin is 25 percent. Use this page when the record you need is the HTML and Characters 24.
HTML for the Lines You Typed
The headline answers that the result is an HTML preview. From the line # Hi, a blank line, and Hello, the text is <h1>Hi</h1> then a newline then <p>Hello</p>, and the Characters line is 24. From - a and - b, the text is one list with two items and Characters is 29. From an empty field, the headline is Enter from 1 to 20000 characters. The label on a successful run reads Preview. Raw HTML in the source is escaped.
Checking the Tags and the Count
Preview the sample and confirm the h1, the paragraph, and Characters 24. The text should match <h1>Hi</h1> then a newline then <p>Hello</p>. Remove the space after the mark and confirm #Hi becomes a paragraph. Add a fourth mark and confirm the line stays a paragraph. Preview - a and - b and confirm one list and Characters 29. Type a raw tag and confirm the brackets are escaped. Clear the field and confirm Enter from 1 to 20000 characters. Reset and preview once more so the sample is the last HTML.
A sale price after one discount percent is a different reduction. The Discount Calculator multiplies a price by one percent and subtracts. A price of 80 at 25 percent is a discount of 20 and a sale price of 60. The headline there is the sale price. That page does not preview Markdown as HTML. Use it when the sample price of 80 at 25 percent should return a sale price of 60. Use this page when the sample lines should return Characters 24.