Using the AMP Validator
The AMP Validator runs local checks on HTML you paste. The HTML field starts as <!doctype html><html amp><head><meta charset="utf-8"><link rel="canonical" href="https://www.nimbtools.com/example"></head><body><p>Hello</p></body></html>. Choose Validate AMP HTML. The label above the headline reads Result. The headline is Passes the local checks. The text says The HTML passes the local checks for AMP markers, a canonical link, and a charset. No script elements were found. These checks are local and do not fetch the page. The Characters line is the length of the HTML you pasted. The Scripts line reads None. The page does not open the canonical address.
The checks look at the HTML after it is lowercased. A pass needs four things, and it rejects a fifth. The lowered HTML must not contain a script element. It must contain rel="canonical" with double quotes. It must contain charset. It must contain an html tag and it must contain amp. The sample does all of that. The html element is written as <html amp>, which supplies both an html tag and the AMP marker amp. The head includes <meta charset="utf-8"> and a canonical link whose href is https://www.nimbtools.com/example. The body is <p>Hello</p>. No script element is present.
A script element fails. The headline becomes Remove script elements, and the lines are cleared. That check runs first. If the HTML has no script element and also has no rel="canonical", the headline is Add a canonical link. If the canonical link is present and charset is missing, the headline is Add a charset. If those pieces are present and an html tag or amp is missing, the headline is Mark the html element with amp. The sample trips none of these messages.
Copy result copies the pass sentence. It does not copy the HTML, the Characters line, or the Scripts line. Reset returns the field to the sample HTML and the headline to Paste HTML. The label returns to Result. The text and the lines are cleared. Copy the sentence before you reset. Validate the sample again and the headline stays Passes the local checks. These checks are local and do not fetch the page.
What Passes the Local Checks Means
The headline Passes the local checks means the pasted HTML satisfied the checks on this page. It does not mean a remote service fetched the document. The text says The HTML passes the local checks for AMP markers, a canonical link, and a charset. No script elements were found. These checks are local and do not fetch the page. Read that sentence with the headline. The label above the headline reads Result.
The Characters line counts every character in the field, including the brackets. The Scripts line reads None when the run passes, because a script element would have failed the run before a pass could be shown. Hello is the text inside the sample body paragraph. The canonical href in the sample is https://www.nimbtools.com/example. The page does not request that address. The href is only text inside the link element.
An error headline replaces the pass. Remove script elements, Add a canonical link, Add a charset, and Mark the html element with amp are the four failures. After any of them, the Characters line and the Scripts line are cleared. Paste the sample again and validate if you want the headline Passes the local checks.
How the Sample Clears Each Check
The page lowercases the HTML and searches for fixed text. A script tag would match a script element, including one with a source attribute. The sample has no script tag, so the first check passes. Next the page looks for rel="canonical". The sample link is written with double quotes, so that check passes. A canonical link written with single quotes does not contain rel="canonical" and fails with Add a canonical link. Next the page looks for charset. The sample meta element contains charset, so that check passes. Last, the page requires both an html tag and amp. <html amp> contains both, so the sample passes.
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 read HTML. Use it when the sample principal of 1000 should become 1050. Use this page when the HTML should pass the local checks.
What the Local Checks Leave Out
These checks are local and do not fetch the page. The canonical href is not opened, so a href that points nowhere can still pass if the characters rel="canonical" are present. The page does not check that the href matches the document you meant. https://www.nimbtools.com/example is simply the href in the sample.
From the Sample HTML to a Pass
Leave the field as <!doctype html><html amp><head><meta charset="utf-8"><link rel="canonical" href="https://www.nimbtools.com/example"></head><body><p>Hello</p></body></html>. Choose Validate AMP HTML. The headline is Passes the local checks. The text says The HTML passes the local checks for AMP markers, a canonical link, and a charset. No script elements were found. These checks are local and do not fetch the page. Scripts reads None. Validate again. The same headline returns.
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 paste HTML. Use it when the sample principal of 1000 should earn interest of 100. Use this page when the headline you want is Passes the local checks.
HTML That Fails a Local Check
A common miss is to add a script element and expect a pass because the rest of the sample is intact. A script element fails. The message is Remove script elements. Another miss is to write the canonical link with single quotes. The check looks for rel="canonical" with double quotes. Single quotes produce Add a canonical link. Another miss is to drop charset while leaving the rest. The message is Add a charset. Another miss is to use an html element with no amp marker and no other amp letters. The message is Mark the html element with amp.
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 look up a store, and it does not read HTML. Use it when the sample price of 80 at 25 percent should return a sale price of 60. Use this page when the paste should pass the local checks.
Keeping the HTML and the Pass Sentence
Copy the pass sentence. It already says The HTML passes the local checks for AMP markers, a canonical link, and a charset. No script elements were found. These checks are local and do not fetch the page. The sentence does not include the HTML. Paste the HTML into the same note if a later reader needs to see <html amp>, the charset, the canonical link, and Hello. The Characters line and the Scripts line are not inside the copied sentence. Write them beside the sentence if you need them. Scripts on a pass is None.
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 check HTML. Use it when the inputs are revenue and cost and the sample margin is 25 percent. Use this page when the record is a pass sentence plus the HTML that produced it.
A Pass for the HTML You Pasted
The headline answers whether the pasted HTML cleared the local checks. For the sample, the answer is Passes the local checks. The text names AMP markers, a canonical link, and a charset, and it says no script elements were found. These checks are local and do not fetch the page. A script element fails with Remove script elements. A missing canonical link fails with Add a canonical link. A missing charset fails with Add a charset. A missing html tag or a missing amp marker fails with Mark the html element with amp.
Checking a Pass Against the Sample
Compare the field with <!doctype html><html amp><head><meta charset="utf-8"><link rel="canonical" href="https://www.nimbtools.com/example"></head><body><p>Hello</p></body></html> before you quote the sample. Confirm <html amp>, rel="canonical", and charset are all present, and confirm there is no script element. Then read the headline. It should be Passes the local checks. Read the Scripts line. It should be None. If the headline is a failure message, the field is no longer a passing paste, even if it looks close.
A comparison of two numbers is a different result. 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 read HTML. Use it when you are comparing two numbers and the sample result is 22.22. Use this page when the HTML should pass the local checks for AMP.