w3c

Converting DOMTimeStamp to localized HH:MM:SS MM-DD-YY via Javascript

泪湿孤枕 提交于 2019-12-01 17:57:20
The W3C Geolocation API (among others) uses DOMTimeStamp for its time-of-fix. This is "milliseconds since the start of the Unix Epoch". What's the easiest way to convert this into a human readable format and adjust for the local timezone? One version of the Date constructor takes the number of "milliseconds since the start of the Unix Epoch" as its first and only parameter. Assuming your timestamp is in a variable called domTimeStamp , the following code will convert this timestamp to local time (assuming the user has the correct date and timezone set on her/his machine) and print a human

Why isn't my document validating as XHTML 1.1 STRICT?

痞子三分冷 提交于 2019-12-01 17:24:47
问题 While target="_blank" is deprecated, why is the W3C validator not giving an error about this ? You can paste and check this code int the validator: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <p> <a href="http://www.stackoverflow.com" title="New window will open" target="

Why HTML 5 still have support for Presentational elements?

五迷三道 提交于 2019-12-01 16:57:02
问题 See list here: http://www.w3schools.com/html5/html5_reference.asp like <b> , <i> , <br> , <hr> , <small> ? Is it means no cons to use these? But what about content and presentation seperation? 回答1: Two reasons come to mind: Because some people (not me, here is a primer about this opinion and here are the WHATWG FAQ about this) don't think of them as presentational. They argue, that <b> has semantics of its own, for example, where <strong> is not right and the text should be bold anyways (IMHO

Can I access w3c style logs when using firebase hosting

元气小坏坏 提交于 2019-12-01 16:02:28
I am using firebase hosting and would like access to w3c style internet access logs for the traffic going to my domain. Is this possible? Thanks. No. Disclosure: I work for Firebase. Firebase's Hosting is most often used for single-page applications that are built on top of Firebase's realtime database. In such applications, the number of times a static resource is retrieved is not a good indicator of the application's usage. Instead of that, most developers rely on the Firebase dashboard that shows the database usage over time, including the number of concurrent connections, data transfer and

Can I access w3c style logs when using firebase hosting

穿精又带淫゛_ 提交于 2019-12-01 15:39:04
问题 I am using firebase hosting and would like access to w3c style internet access logs for the traffic going to my domain. Is this possible? Thanks. 回答1: No. Disclosure: I work for Firebase. Firebase's Hosting is most often used for single-page applications that are built on top of Firebase's realtime database. In such applications, the number of times a static resource is retrieved is not a good indicator of the application's usage. Instead of that, most developers rely on the Firebase

What is the limit of character to use in alt=“text” according to WCAG 2.0?

旧城冷巷雨未停 提交于 2019-12-01 15:30:45
What is the limit of character to use in alt="text" according to WCAG 2.0? there is no limit explicitly set, but conventionally they are limited to 1024 chars. I believe that I have heard that the search engines will go no further than about 200 characters. What is the use case? There is a longdesc attribute that may be of interest... http://www.w3.org/TR/REC-html40/struct/objects.html#adef-longdesc-IMG WCAG says: Sometimes images are worth a thousand words. Maps, Graphs and Charts are examples of images that contain information necessary to understanding the message of a page but too complex

W3C validation error with data-href

此生再无相见时 提交于 2019-12-01 14:06:48
I am getting one validation error due to my use of data-href="" in the context of making a whole DIV clickable. The JS and HTML is below. What could I do to make this W3C compliant? JQUERY $(function(){ $(".linked").click(function(){ window.location = $(this).attr("data-href"); return false; }); }); HTML <div class="" data-href="link.html"></div> If possible, you should consider using a doctype that supports data-* attributes. For HTML5, that's: <!DOCTYPE html> Since data-* is part of the HTML5 specification, you need to use the html5-doctype: <!DOCTYPE html> Any other doctype will parse your

Why can't inline elements be transformed?

∥☆過路亽.° 提交于 2019-12-01 13:23:19
问题 The CSS transformations spec says transforms only work on block-level or atomic inline-level elements (e.g. inline-block ). But why don't they work on inline elements? What is the reasoning behind this limitation? This test by Microsoft shows it's possible. It passes in IE9, but not in Chrome. So it's possible, just not by the spec. 回答1: As @Shikkediel mentioned, inline elements do not have strong boundary like block elements do. They don't influence the flow of the document in the same way,

W3C validation error with data-href

ⅰ亾dé卋堺 提交于 2019-12-01 13:12:14
问题 I am getting one validation error due to my use of data-href="" in the context of making a whole DIV clickable. The JS and HTML is below. What could I do to make this W3C compliant? JQUERY $(function(){ $(".linked").click(function(){ window.location = $(this).attr("data-href"); return false; }); }); HTML <div class="" data-href="link.html"></div> 回答1: If possible, you should consider using a doctype that supports data-* attributes. For HTML5, that's: <!DOCTYPE html> 回答2: Since data-* is part

Working example for MediaElementAudioSourceNode with Chrome Canary?

[亡魂溺海] 提交于 2019-12-01 13:05:56
I'm experimenting with the W3C Web Audio API implemented and enabled in Google Chrome Canary builds. (i have 15.0.865.0 canary on Windows 7 x64 at the moment) Demo applications work just fine. I like to use MediaElementAudioSourceNode because i like to play a larger OGG music. For such audio files the API says that i should use this instead of AudioBufferSourceNode . I've written a very simple example: <script type="text/javascript"> var audioElement = document.createElement('audio'); audioElement.setAttribute('src', 'dubfx.ogg'); var audioContext = new webkitAudioContext(); var