w3c-validation

Autocapitalize attribute on input element (used for iOS) breaks validation

删除回忆录丶 提交于 2020-01-01 10:08:13
问题 As can be seen here, Safari and Safari for the iPhone support all HTML elements, including deprecated elements and even some proprietary elements that were never part of any W3C specifications. It's actually very useful including autocapitalize in the 'email' and 'website' fields in forms, as there's nothing so annoying as having to unselect the SHIFT key when filling in either of those two inputs. Doing this is trivial as all you need to do is add the autocapitalize=off attribute to the

Getting an error in W3C Markup Validation when trying to get a whole <Figure> element as a link in a page

我只是一个虾纸丫 提交于 2019-12-31 03:08:05
问题 I am trying to get whole <figure> element as a link so i wrote these line of code :- <figure> <a href="#"> <img src="images/product-image.jpg" alt="image " /> <span class="label"><span class="rotate">40%</span></span> <span class="curle-label_bg"></span> <figcaption><span class="product-brand">Brand of product</span> Main Caption here <span class="save-money">Save 395.05</span> <span class="product-price">€169.30</span> </figcaption> </a> </figure> I am getting an error "Element figcaption

How to write W3C compliant multi-level bullet points in HTML?

无人久伴 提交于 2019-12-29 04:27:06
问题 Is it possible to write W3C compliant multi-level bullet points (unordered list) in HTML? Nested ul can be used, but is not W3C compliant. <ul> <li>myItem 1</li> <li>myItem 2</li> <ul> <li>myItem 2a</li> </ul> <li>myItem 3</li> <li>myItem 4</li> </ul> myItem 1 myItem 2 myItem 2a myItem 3 myItem 4 In Visual Studio, the above code gives the warning: Validation (XHTML 1.0 Transitional): Element 'ul' cannot be nested within element 'ul' 回答1: The only valid child of either a ul or ol is an li

W3C validation with AngularJS directives

烈酒焚心 提交于 2019-12-28 13:39:12
问题 How do we go about doing W3C validation with an Angular application? Since custom directives make for invalid HTML validation, we typically see lots of W3C validation errors. Are there any strategies for this? 回答1: Strict w3c validation allows any data-* attributes, and any class. Directives can be applied to DOM elements with any of: <tag directive-name> <tag data-directive-name> (*) <tag x-directive-name> <tag directive_name> <tag x_directive_name> <tag data_directive_name> At least the

Hosting W3 XML Schema files locally

冷暖自知 提交于 2019-12-28 07:02:41
问题 I work at a company where we have our own XML language with its own set of schemas that validate against the W3 schema. For business reasons, I need to host these files internally instead of relying on the web hosted versions. I have little experience with XML schemas and am wondering what exactly this means. Is it as simple as copying and pasting the page source into my own file and pointing our other schemas there? Do I need to worry about the namespace documents as well? Any help here is

What elements can a span tag contain in HTML5?

馋奶兔 提交于 2019-12-28 02:48:08
问题 So I have been a CLI or Cron developer in PHP for most my career and now I am learning why I did not like UI work in school ;) I am dealing with HTML5 validation here and I am not finding an answer to a question that is for curosity. I ran the W3C HTML5 validation on my home page and I got several errors around a div being within a <span> and that is not allowed. I tried changing all <div> within spans to a <p> but recieve pretty much the same error. http://www.w3schools.com/html5/tag_span

Javascript and W3C validity?

时光毁灭记忆、已成空白 提交于 2019-12-25 01:20:07
问题 I have the impression that the use of javascript often breaks W3C xhtml/css validity. Is this true? If so, why and is there a way for me to use javascript in my webpages and still have them be W3C valid (html, xhtml, css)? 回答1: If you wrap your javascript in a //<![CDATA[ tag it will validate https://developer.mozilla.org/en/properly_using_css_and_javascript_in_xhtml_documents 回答2: The answer of your question is yes. To avoid this read this link http://www.htmlhelp.com/tools/validator

About use 'aria-expanded' on 'role=menuitem'

本秂侑毒 提交于 2019-12-24 08:04:36
问题 aria-expanded="bool" is not support attribute that role="menuitem" . Please refer to W3C HTML Document. (https://www.w3.org/TR/html/) If use that, get markup error on Nu Html Checker . But when I create some menu widget I must use it. And W3C use the same way in the formula example: https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/examples/menubar/menubar-1/menubar-1.html https://www.w3.org/WAI/tutorials/menus/application-menus-code/ What is right and what is wrong? 回答1: As

How can I get the WordPress language_attributes function to return valid XHTML 1.1?

二次信任 提交于 2019-12-24 07:35:56
问题 I have a WordPress template that contains the following element: <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes('xhtml'); ?>> This returns: <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en-US"> Unfortunately the "lang" attribute is invalid XHTML 1.1 - and the client would like this level of validation. WordPress' general-template.php file contains the following code: if ( get_option('html_type') == 'text/html' || $doctype == 'html' )

CSS validation not validating

余生颓废 提交于 2019-12-24 05:35:15
问题 /* ** ** custom select color ** ** */ ::selection { background: #525252; /* Safari */ } ::-moz-selection { background: #525252; /* Firefox */ color:#fff; } The above code is not passing the W3C validator, but I can't understand the reason for it. The following error is returned: The pseudo-element ::selection can't appear here in the context css21 [selection] The pseudo-element ::-moz-selection can't appear here in the context css21 [-moz-selection] 回答1: 1 The pseudo-element ::selection can't