Are void elements and empty elements the same?

The term “empty element” comes from SGML, on which HTML standards prior to HTML5 were based, and where the EMPTY keyword is used to represent elements with an empty content model. Here’s what the HTML 4 spec says: The allowed content for an element is called its content model. Element types that are designed to … Read more

What can service workers do that web workers cannot?

Buksy’s answer is correct but in my opinion it does not answer the original question, namely: “What can service workers do that web workers cannot? Or vice versa?” There are fundamental differences in their lifecycle and the number of instances per origin you can have. In short: | Web Workers | Service Workers | |————–|————–|——————| … Read more

Is the copyright meta tag valid in HTML5?

Dublin Core proposes the rightsHolder term (an extension to the <meta> name attribute), which validates using the W3C HTML5 validator: <meta name=”dcterms.rightsHolder” content=”Your Copyright-Holder Organization”> This is defined as A person or organization owning or managing rights over the resource. Additional terms: For a statement about property rights, we can use the regular rights term: … Read more

Alternative for innerHTML?

The recommended way is through DOM manipulation, but it can be quite verbose. For example: // <p>Hello, <b>World</b>!</p> var para = document.createElement(‘p’); para.appendChild(document.createTextNode(‘Hello, ‘)); // <b> var b = document.createElement(‘b’); b.appendChild(document.createTextNode(‘World’); para.appendChild(b); para.appendChild(document.createTextNode(‘!’)); // Do something with the para element, add it to the document, etc. EDIT In response to your edit, in order to … Read more

is form enctype “application/json” available?

The W3C publishes many drafts and proposals which are then discussed within the community at large. If a draft makes it to the stage where it’s generally considered useful, browser vendors will/may start implementing it. The draft then typically advances to a “recommendation” stage, meaning the W3C officially recommends that browsers implement the technology as … Read more