w3c-validation

div inside table

半城伤御伤魂 提交于 2019-11-27 02:07:27
Can somebody tell me whether div inside a table is allowed or not according to w3c echox <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>test</title> </head> <body> <table> <tr> <td> <div>content</div> </td> </tr> </table> </body> </html> This document was successfully checked as XHTML 1.0 Transitional! You can't put a div directly inside a table , like this: <!-- INVALID --> <table> <div> Hello World </div> </table> Putting a div inside a td or th element is fine, however: <!-- VALID --> <table> <tr> <td> <div> Hello World </div> </td> </tr> </table> Paul you can put

Is <link> (not rel=“stylesheet”) allowed to be used in <body>?

♀尐吖头ヾ 提交于 2019-11-27 00:17:14
问题 The new schema.org by Google, Yahoo and MS recommends usage of the <link> attribute to display the status of products in an online shop: <div itemscope itemtype="http://schema.org/Offer"> <span itemprop="name">Blend-O-Matic</span> <span itemprop="price">$19.95</span> <link itemprop="availability" href="http://schema.org/InStock"/>Available today! </div> Yet, according to w3schools.org <link> is only allowed in head sections: Note: This element goes only in the head section, but it can appear

w3c markup validator ampersand (&) error

ⅰ亾dé卋堺 提交于 2019-11-26 17:16:46
问题 Is there any workaround for the w3c validation error for an & present in urls or some other place in HTML markup? It says: & did not start a character reference. (& probably should have been escaped as & .) The ampersand in my case is a part of a url for gravatar thumbnail. This is the problematic part of a url: c91588793296e2?s=50&d=http%3A%2F% . 回答1: for each & sign you got write & in your example it would be: c91588793296e2?s=50&d=http%3A%2F% 回答2: Use & for literal ampersands, even in URLs

Should I care about W3C validation?

不打扰是莪最后的温柔 提交于 2019-11-26 16:26:01
问题 I'm learning AngularJS and I found a simple code like this one: <!DOCTYPE html> <html> <head> <meta charset='utf-8'> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.js"></script> </head> <body ng-app ng-init="name = 'World'"> <h1>Hello, {{name}}!</h1> </body> </html> does not pass W3C validation test, mainly because there are non standard attributes ( ng-app , ng-init ). The question is: should I care about W3C validation of my application? Should I abandon AngularJS

Why can&#39;t a <button> element contain a <div>?

拟墨画扇 提交于 2019-11-26 14:48:27
问题 My company is building a website and we had some problems with a JavaScript library not replacing something. We decided to throw our HTML in to the W3C validator and it informed us it's illegal to have a <div> tag inside a <button> tag. <button class="button" type="submit"> <div class="buttonNormalLargeLeft"><!--#--></div> <div class="buttonNormalLargeCenter">Search Flights</div> <div class="buttonNormalLargeRight"><!--#--></div> </button> Results in: Line 287, Column 46: Element div not

How to validate vendor prefixes in CSS like -webkit- and -moz-?

空扰寡人 提交于 2019-11-26 13:45:18
I use the webkit/mozilla border radius and box shadow CSS properties, but I want the CSS to validate (which it currently does not). Is there a way to get it to validate? http://jigsaw.w3.org/css-validator/ No, they are browser specific properties, and not defined in the standard CSS specification. That being said, they correctly follow the rules for vendor specific extension of CSS. It's just not in the W3C official CSS specification. Although the syntax for vendor extensions is mentioned in the CSS3 Syntax module and introduced into the grammar to allow vendors to implement their own prefixes

How do I escape an ampersand in a javascript string so that the page will validate strict?

 ̄綄美尐妖づ 提交于 2019-11-26 13:03:09
问题 I am trying to pass a dataString to to an ajax call using JQuery. In the call, I construct the get parameters and then send them to the php page on the receiving end. The trouble is that the data string has ampersands in them and the HTML strict validator is chocking on it. Here is the code: $(document).ready(function(){ $(\"input#email\").focus(); $(\'#login_submit\').submit(function(){ var username = $(\'input#email\').val(); var password = $(\'input#password\').val(); var remember = $(\

w3c html validation error - Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections

主宰稳场 提交于 2019-11-26 12:45:16
问题 I am getting a warning when I try to validate my page in http://validator.w3.org : Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections. My code is as below : <section id=\"slider-wrapper-new\"> <div class=\"slider-container-new\"> // some code.. </div> </section> How can I remove this error ? Do I compulsory need to add h1 - h6 tags inside section heading ? 回答1: Either: Add a heading ( h1 , ..., h6 ) tag to your section element. Replace your

Google fonts URL break HTML5 Validation on w3.org

家住魔仙堡 提交于 2019-11-26 10:09:47
问题 I load 3 fonts in different sizes using this HTML tag: <link rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Open+Sans:400,600,300,800,700,400italic|PT+Serif:400,400italic|Bree+Serif\"> Till ~1/2 weeks ago this was supported by w3.org validator for HTML5; now it gives this error: Line 14, Column 163: Bad value http://fonts.googleapis.com/css?family=Open+Sans:400,600,300,800,700,400italic|PT+Serif:400,400italic|Bree+Serif for attribute href on element link:

div inside table

僤鯓⒐⒋嵵緔 提交于 2019-11-26 09:55:48
问题 Can somebody tell me whether div inside a table is allowed or not according to w3c 回答1: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>test</title> </head> <body> <table> <tr> <td> <div>content</div> </td> </tr> </table> </body> </html> This document was successfully checked as XHTML 1.0 Transitional! 回答2: You can't put a div directly inside a table , like this: <!-- INVALID --> <table> <div> Hello World </div> </table> Putting a div inside a td or th element is fine,