w3c-validation

Why would you need a “Valid XHTML & CSS” notice at the end of a page

扶醉桌前 提交于 2019-12-10 15:54:53
问题 I've seen this in the footer of various websites, most of them non-technical websites. Some websites go even further and include a W3C badge stating the fact. I don't see how this can be of any help to the targeted audience. 回答1: I can think of a few possible reasons: It may be a marketing tool. "Look, we code to appropriate standards!" This could apply to the individual who designed the site (and might include it in their portfolio), even if the company as a whole is non-technical. It could

How do I validate noscript+meta refresh tag in xHTML?

天大地大妈咪最大 提交于 2019-12-10 13:12:50
问题 For visitors that don't support JavaScript, I'm redirecting them to a certain page - "js.html". For this, I have the following in all my files: <noscript> <meta http-equiv="Refresh" content="0;URL=js.html" /> </noscript> Of course, this doesn't validate in XHTML as noscript must be placed in <body> . But when I place that code in the body of my document, I get another error, because meta tags can only be used in the <head> section, so I'm kind of stuck in an infinite loop here. Is there a way

Isn't “text-overflow: ellipsis” valid CSS?

帅比萌擦擦* 提交于 2019-12-10 12:57:23
问题 This code triggers an error when run through the W3C CSS Validator: p{ text-overflow: ellipsis; } I get: Line Code context Error/Warning 2 p Parse Error [empty string] Is it just a bug in the validator or am I missing something really obvious? 回答1: This is a bug in the CSS validator, it has been already reported. text-overflow:ellipsis is a valid rule, however the W3C CSS validator is unfortunately prone to errors (see bug list). However, note that the current working draft lists some text

How widely supported is the iframe attribute “allowfullscreen”?

扶醉桌前 提交于 2019-12-10 01:14:14
问题 I can't seem to find any websites detailing the support for the iframe attribute "allowfullscreen". CanIUse.com doesn't seem to have a listing for it, for example. Does anyone have the support information for Chrome, Safari, IE and Firefox? 回答1: I've started discovering some of my own answers: FireFox : Added support in v18 (January 8, 2013) - Source Chrome : Added support in v27 (May 22, 2013) - Source Safari: Added support in v7 (October 22, 2013) - Source Internet Explorer: Added support

Can a td be inside a td

a 夏天 提交于 2019-12-09 08:25:46
问题 It may be a nonsense question, and I know we have to follow standards as much as possible. But can <td> be a direct child of another <td> , like this: <td class="parent"> <td class="child"> <!-- Some info --> </td> </td> Or it's obligatory to create another <table> with a new <tr> before adding the <td> , which can become heavily populated with table tags and become clustered... 回答1: not directly but you could place table inside td <td class="parent"> <table><tr> <td class="child"> <!-- Some

IE frameBorder alternative

随声附和 提交于 2019-12-08 19:49:31
问题 For this line of code: <iframe width="600" height="400" frameBorder="0" src="http://stackoverflow.com"></iframe>​ I got this error: (validator.w3.org : XHTML 1.0 Transitional) there is no attribute "frameBorder" I'm using frameBorder because IE8 creates some kind of border on iframes. On latest Chrome/Firefox it's fine. Is there any other, W3C valid, way to remove border form iframe on IE8 ? 回答1: Simply use CSS: <iframe width="600" height="400" style="border:none;" src="http://www.google.com"

Correct way to insert favicon link tag in SVG [duplicate]

落花浮王杯 提交于 2019-12-08 13:54:17
问题 This question already has an answer here : Can pure SVG document specify a Favicon.ico? (1 answer) Closed 5 years ago . What is the correct way to insert a link tag that points to favicon? I've tried the following but the W3C Validator reports element "xhtml:link" undefined . <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3

Whitespace before XML declaration from JSP

白昼怎懂夜的黑 提交于 2019-12-08 10:44:29
问题 I'm trying to achieve full XHTML transitional validation of my JSP output but I've hit a snag. The top of the header looks like this: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> It is included with a statement that looks like this: <jsp:include> <jsp:attribute name="page"><owportal:page name="/style/portal/header.jsp" /></jsp:attribute> </jsp:include> The <owportal:page>

HTML classes and IDs with with $ or non alpha numeric characters

会有一股神秘感。 提交于 2019-12-08 09:48:18
问题 I'm looking at some site code on an XHTML doctype and from what I'm seeing the framework is ASP.net. The IDs in the HTML has a "$" in there. For example: <img id="$ct100templateContent$SectionPanel1$ctl01$ctl02ctl00_templateContent_SectionPanel1_ctl01_ct999img" src="this.jpg"/> From a W3C semantic point of view the "$" is not valid in an ID or Class. IDs and classes can only contain alpha numeric characters in an XHTML doctype. Is the the "$" a ASP.net naming convention referencing a web

W3C validator: “Bad value robots for attribute name on element meta”

南楼画角 提交于 2019-12-08 03:08:28
问题 What has changed with <meta name="robots" content="index,follow"> meta tag? I use HTML5 and W3C validator marks my page as invalid. There is robots meta name allowed in http://wiki.whatwg.org/wiki/MetaExtensions. Exact validator error: Bad value robots for attribute name on element meta : Keyword robots is not registered. 回答1: The validator is wrong. The robots name is registered according to HTML5’s rules, so you can use it. You’ll probably see the same problem with all other registered