Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi Coders!!

I'm new here and I hope I will get your support whenever I stuck.

I have a website and I tried to implement AMP code, but there are so many errors after implementing AMP code.

Could anybody helps me to solve these errors?

What I have tried:

AMP Validator Errors
Posted
Updated 29-Jul-19 1:40am
Comments
Thomas Daniels 29-Jul-19 7:35am    
That's a lot, I'm sure that none of us will go through all these errors. Have you tried inspecting the code analysis and clicking the "Learn more." link wherever it appears?

1 solution

All the errors are self-explanatory, what help you want? I will talk about a few, the first error that I see in the line is,
Quote:
The attribute 'href' in tag 'link rel=stylesheet for fonts' is set to the invalid value '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css'.
What do you think this says? Check your HTML code for this,
HTML
<link rel='stylesheet' id='jquery-ui-css'  href='//ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css' type='text/css' media='all' />
Don't you think this should be set to something like this?
HTML
<link rel='stylesheet' id='jquery-ui-css'  href='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css' type='text/css' media='all' />
Unless you have a similar directory defined to find the stylesheets from the file system.

Similarly there are other issues that you need to take into consideration because of the AMP requirements, like,
Quote:
Custom JavaScript is not allowed.
Only way to solve this is by removing the custom JavaScript from your code—I do not know why this reason, because I have not worked in this domain, but most probably custom JavaScript slows down the pages on the web, that is why they require that you remove the custom JavaScript and leave only pure HTML/CSS to be loaded and displayed to the users.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900