w3c-validation

Element style not allowed as child of element body in this context (<style scoped> not validating)

久未见 提交于 2019-12-01 03:19:29
<!DOCTYPE html> ... <style scoped> /* css */ </style> The w3.org validator is giving me this error: Line 883, Column 17: Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.) <style scoped>... Contexts in which element style may be used: If the scoped attribute is absent: where metadata content is expected. If the scoped attribute is absent: in a noscript element that is a child of a head element. If the scoped attribute is present: where flow content is expected, but before any other flow content other than inter-element whitespace

W3C validation says h1 in article is invalid

故事扮演 提交于 2019-12-01 03:05:26
I'm running my website through the W3C validation service. I'm getting an error message for the following HTML: <section class="about"> <article> <header> <h1>Mission</h1> </header> <div class="content"> <p>bla bla bla</p> </div> <aside> <img src='/images/logo-hse-250x250.png' /> </aside> </article> </section> The W3C validation error is: Consider using the h1 element as a top-level heading only (all h1 elements are treated as top-level headings by many screen readers and other tools). <h1>Mission</h1> I thought with HTML5, it was allowed to use more than one h1 tag on a page. And that h1 tags

“The text content of element script was not in the required format: Expected space, tab, newline, or slash but found { instead.”

喜夏-厌秋 提交于 2019-12-01 01:16:16
问题 My HTML is almost HTML5-compliant according to the W3C Validator, only one error is remaining: the Javascript code to configure the Google Plus buttons. Whether I add CDATA or not, the error "The text content of element script was not in the required format: Expected space, tab, newline, or slash but found { instead." is displayed for this line: <script src="http://apis.google.com/js/plusone.js" type="text/javascript"> {"lang":"en","parsetags":"explicit"} </script> 回答1: ...I sorely doubt you

CSS3 calc() validation: Value Error : width Parse Error [duplicate]

点点圈 提交于 2019-11-30 18:27:54
This question already has an answer here: Parse errors when using calc with rem and px 1 answer I need to validate a CSS3 file where I'm using the following code: width:calc(96.3% - 312px) It returns this error: Value Error : width Parse Error - 312px) My last choice is to use a Javascript function on page load and window resize to get the width value when it's possible using CSS3 (only for IE8 or older). This appears to be a bug in the validator. Your calc() syntax is valid. Don't worry about it. Whenever you need to validate your CSS, remove just that declaration so it does not cause

Is it necessary to have <tbody> in every table?

你说的曾经没有我的故事 提交于 2019-11-30 14:27:38
问题 Is it necessary to have <tbody> in every table? According to Standards. 回答1: Only if you define thead and tfoot . It is mostly used when the table has multiple bodies of content. If the data in the table is easily understood to be the tbody then you can safely omit it. 回答2: For the small fraction of your users still using IE7, you MUST add encapsulate your tr's in a tbody tag if you're building a table with the DOM methods! This will work in all major browsers: var table = document

Best practice for meta data in a html document?

微笑、不失礼 提交于 2019-11-30 10:52:21
问题 I work on a large scale, high volume, public facing web application. The successful operation of the application is very important to the business, and so there are a number of MI tools that run against it. One of these MI tools essentially looks at the html that is sent to the browser for each page request (I've simplified it quite a lot, but for the purpose of this question, its a tool that does some analysis on the html) For this MI tool to get the data it needs, we put meta data in the

What throws Internet Explorer into quirks mode?

自作多情 提交于 2019-11-30 08:55:34
问题 I have created a webpage ( http://www.snow4life.yum.pl ) that was rendered properly in firefox, chrome etc. Of course dumb IE complicated things, because it enters quirk mode automatically, even though doctype is properly set and site goes through w3 validation (there is one error of missing some char, but file was cleared in hex editor). How can I stop ie from entering quirks mode ? Is there any way ? 回答1: Try killing all the whitespace before the DOCTYPE. EDIT: There is an <feff> character

Google +1 Button not W3C compliant

有些话、适合烂在心里 提交于 2019-11-29 22:42:52
So I've been playing with Google's +1 button trying to get it on my website, but it's not W3C compliant. Here's the code: <!-- Place this tag in your head or just before your close body tag --> <script type="text/javascript" src="http://apis.google.com/js/plusone.js"> {lang: 'en-GB'} </script> <!-- Place this tag where you want the +1 button to render --> <g:plusone size="medium" href="http://www.example.org"></g:plusone> Does anyone know why this happens and how to make this compliant? Thanks EDIT: To get this to pass through the validation, I wrote an article on my website . Quentin Does

Bad value for attribute action on element form: Must be non-empty

感情迁移 提交于 2019-11-29 14:22:08
问题 I have a regular form on my php file, after it's submitted it has to echo a message. By putting anything in the action="", the only way I can think of displaying a message is by storing it into a session and display it when the page loads if there is a session set. Everything works fine the way it is right now but w3c validator says I have an error: Bad value for attribute action on element form: Must be non-empty. How can I fix this error without having to put # or index.php into the action

Does HTML5 require an action attribute for forms? [duplicate]

牧云@^-^@ 提交于 2019-11-29 13:57:32
This question already has an answer here: Is action really required on forms? 4 answers I've just run a webpage of mine through the W3C HTML5 validator, and it validates completely, even though the form in it doesn't have an action attribute, which the HTML 4 validator always complains about. Considering the fact that the HTML5 validator is still experimental, is the fact that the form validating despite not having an action attribute a problem with the validator, or has the HTML5 spec changed to not require that attribute any more? According to the specification action is not mandatory: The