w3c-validation

Nesting h3 inside anchor - how is this valid?

早过忘川 提交于 2019-11-29 10:52:21
<li class="vcard"> <a class="url" href="/about/us/"> <img class="photo" alt="some" src="/img/nicething.png"> <h3>hello</h3> </a> <p class="role meta">Something here</p> </li> I've seen this code, I've validated and it returns VALID on w3c HTML5 validation. I tough that we couldn't have h3 inside an anchor . It seems that this became valid if we display:block; the anchor ? If you look at the HTML5 spec , there is a section on the <a> tag: The a element may be wrapped around entire paragraphs, lists, tables, and so forth, even entire sections, so long as there is no interactive content within (e

W3C validation for <ui-select>

谁都会走 提交于 2019-11-29 10:09:18
I am using angular-ui-select within a website where the styled select fields are configured with an own tag named ui-select . This works great, but doing a W3C validation leads to this error: Element ui-select not allowed as child of element div in this context. (Suppressing further errors from this subtree.) Here's an example code: <!doctype html> <html lang="en"> <head><title>x</title></head> <body> <div> <ui-select></ui-select> </div> </body></html> I understand that <ui-select> is not expected to be there but how can I handle this better? Can I wrap it into a different tag or is there a

There is no attribute “allowtransparency”

落花浮王杯 提交于 2019-11-28 22:28:54
I am looking for some alternate way to do: <iframe transparency=true ... When I do the W3C validation, I am getting the error: Column 31: there is no attribute "allowtransparency" If use this CSS, .iframe-trans-fix{ opacity: 0; filter:alpha(opacity=0); } for the above snippet I am getting a blank iframe. While it's true that the W3C's HTML spec does not define it, there is an allowTransparency attribute, and it is supported by all modern browsers (and Internet Explorer). As HTML5 has taught us, the cart is supposed to be before the horse. Suppose you have this HTML on your main page, index

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

旧时模样 提交于 2019-11-28 22:25:53
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' David Thomas The only valid child of either a ul or ol is an li element; an li can, however, contain a ul (or ol ). To achieve your aim: <ul> <li>myItem 1</li> <li

Google +1 Button not W3C compliant

假如想象 提交于 2019-11-28 18:30:48
问题 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?

Parse errors when using calc with rem and px

人走茶凉 提交于 2019-11-28 14:12:19
I have the following CSS: body { width: calc(700px + 2 * 4rem); } .someclass { margin: calc(2rem - 2px) 0; } When I run this through the W3C CSS validation, I get Value Error : width Parse Error + 2 * 4rem) Value Error : margin Parse Error - 2px) 0 What’s causing this? All the units I’m using in calc() are length units, and calc() should be able to handle it. This is a known bug in w3 css validator: https://www.w3.org/Bugs/Public/show_bug.cgi?id=18913 来源: https://stackoverflow.com/questions/18035088/parse-errors-when-using-calc-with-rem-and-px

W3C validation with AngularJS directives

巧了我就是萌 提交于 2019-11-28 08:55:35
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? 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 data- one is fully W3C compliant (provided you declare HTML5 doctype). So the following code validates (the

CSS3 box-shadow property doesn't validate?

我与影子孤独终老i 提交于 2019-11-28 07:34:49
问题 When I run my CSS through the W3C's validator, any time I use the box-shadow property, I get an error like this: 0 is not a box-shadow value : 0 0 10px #000 It appears to stop at whatever the first value is, since changing the order of the values will change the error to match: #000 is not a box-shadow value : #000 0 0 10px I'm validating with the profile set to CSS3, so it's not a case of me forgetting to change the default profile setting from CSS2 (where the box-shadow property doesn't

Nesting h3 inside anchor - how is this valid?

妖精的绣舞 提交于 2019-11-28 04:41:28
问题 <li class="vcard"> <a class="url" href="/about/us/"> <img class="photo" alt="some" src="/img/nicething.png"> <h3>hello</h3> </a> <p class="role meta">Something here</p> </li> I've seen this code, I've validated and it returns VALID on w3c HTML5 validation. I tough that we couldn't have h3 inside an anchor . It seems that this became valid if we display:block; the anchor ? 回答1: If you look at the HTML5 spec, there is a section on the <a> tag: The a element may be wrapped around entire

“Bad value for attribute src on element img: Must be non-empty”, for dynamically generated img src

纵然是瞬间 提交于 2019-11-28 04:15:40
问题 I have a web site with an image slider. I keep the some of the image tags empty as the images load on when slide comes into view for faster page load. The image tags defined as follows: <img data-src="img/portfolio-desktop1-small.png" src="" alt=""/> What I'm doing is on slide function I change the src to data-src with jQuery animation. The slider works great. My problem is when I try to validate it in w3c validation tool it gives the following error: Line 131, Column 179: Bad value for