amp html validation error <div style="clear:both;"> on blogger - html

i have problem about amp validation in blogger
i use old template (classic)and
when try to https://thaifoodguru.blogspot.com/2016/07/som-tum-papaya-spicy-salad.html
it have 2 error at paragraph etc.
1. error type The attribute 'style' may not appear in tag 'div'.
2. error type The attribute 'style' may not appear in tag 'div'.
error come from post maybe
when remove it (i mean no post content) amp validation successful
how i can solve it? please

Make that div into class x
Define this style for .x
This is how I made it in my AMP blogspot. You can check the source - https://amprandom.blogspot.com

Related

Meta tag 'there is no attribute “class” ' and 'there is no attribute “property” 'and other attribute error

I tried to validate my website and I get the following error :
there is no attribute "class"
<aside class="left-off-canvas-menu">
element "aside" undefined
<aside class="left-off-canvas-menu">
there is no attribute "property"
<meta property="og:title" content="Growth Scorecard" />
document type does not allow element "div" here
…+' preptimeline timeline-portion" title="'+titles[parseInt(val)-1]+'"></div>');
How can I solve this error please suggest to me. I have less knowledge of XHTML. please let me know. why an error occurs on my website.
You can see validator's error report.
The elements and attributes you are using were introduced in HTML 5.
XHTML 1.0 Transitional is too old to support them.
Use HTML 5 instead. It better reflects what browsers actually support and what you are trying to do.

On AMP pages should amp-carousel elements have a lightbox attribute or not?

I'm getting different conflicting AMP validation messages..
When I add a lightbox attribute to an amp-carousel element I get the following validation message.
The attribute 'lightbox' may not appear in tag 'amp-carousel'
But if I remove it, I get the following validation message..
The mandatory attribute 'lightbox' is missing in tag 'AMP-CAROUSEL. [lightbox]'
It feels like the AMP validator can't make up its mind.
I'm using this url.
https://leasing.com/car-leasing-news/2018-mercedes-s-class-coupe-cabriolet/amp/
on the following validator..
https://search.google.com/test/amp
You have missed amp-lightbox-gallery-0.1.js to add in header
<script async custom-element="amp-lightbox-gallery" src="https://cdn.ampproject.org/v0/amp-lightbox-gallery-0.1.js"></script>
After adding js screen shot
Before

Unable to validate HTML5 when using placeholder in div

I've been contributing to a WYSIWYG text editor that was made using HTML5 and jQuery. While doing some of my research I've been seeing a lot of people use the placeholder attribute in a div. However, this does not follow the specification and I end up with the following error when I try to validate my HTML.
Attribute “placeholder” not allowed on element “div” at this point.
Is there a better way to do this so that my HTML will validate and I still end up with a placeholder?
Thanks to Juantxo Cruz's link I was able to fix my issue by using CSS as shown below:
HTML
<div contentEditable=true data-placeholder="Sample text"></div>
CSS
[contentEditable=true]:empty:not(:focus):before {
content:attr(data-placeholder)
}

3 validation errors- unsure of how to correct

Line 10, Column 43: Bad value FRSH Studio for attribute href on element link: Whitespace in path component. Use %20 in place of spaces. <link rel="pingback" href="FRSH Studio" />
--- It is my understanding that this is pulled from my settings in Wordpress. When I change the setting to include the %, I'm given an error stating that "Path component contains a percent sign that is not followed by two hexadecimal digits." How do I fix this?
Line 146, Column 7: End tag for body seen, but there were unclosed elements. </body>
--- I believe this is referring to <div id="container">...
Line 54, Column 20: Unclosed element div. <div id="container">
--- When I close the container using </div><!-- end container --> in the footer, I'm told that it is a stray tag. Where should </div><!-- end container --> be?
Not sure why this was sent away from Wordpress Stackexchange. The site validates as HTML. It is only when validating the site, which is Wordpress, using the URI via w3c's validator that these errors arise.
Put the full code inside the HTML Tidy and make it valid. Use this: http://infohound.net/tidy/
HTML Tidy is a tool for checking and cleaning up HTML source files. It is especially useful for finding and correcting errors in deeply nested HTML, or for making grotesque code legible once more.
This online version enables you use it without installing the client tool on your PC.
The "stray tag" error may be due to the fact that the page is being parsed as XHTML, where every opening tag (e.g. <!-- end container -->) requires a closing tag.
The best HTML validator is here:
http://validator.w3.org/
That will offer an option to clean up with HTML Tidy as others have mentioned.
1) The href has to be a valid link.
<link rel="pingback" href="http://frshstudio.com" />
2/3) Perhaps you have closed it in the wrong place?
Can you please post code?
Your site appears to be generating bad HTML pages.
1) The value for "href" should be a URL.
2) If you have a "div" start tag, then there needs to be a "div" end tag as well. This may be missing.
3) Would need to see the entire source to be helpful.
As someone suggested, you can use http://validator.w3.org/. Another validator (for Windows so it's offline and it does a lot more) is CSE HTML Validator at http://www.htmlvalidator.com/

Google +1 code validation error: missing attribute

My code: <g:plusone annotation="inline"></g:plusone>
I get this error:
there is no attribute "annotation"
element "g:plusone" undefined
Why?
You have two choices
Change to using this style markup <div class="g-plusone" data-size="tall" ... ></div>
Add the XML NS for google's <g: syntax to the <html tag of the document. Now if only Google would share where that xml namespace is located... (So really, just try option 1)
There is no attribute called "annotation" for any element recommended in the W3C standards. Google probably uses it to parse for some backend processing. If you want the +1 element, you cannot have a W3C standards code.
Check this thread. So what if custom HTML attributes aren't valid XHTML?