w3c

Alternative for innerHTML?

I'm wondering if there's a way to change the text of anything in HTML without using innerHTML. Reason I'm asking is because it's kinda frowned upon by the W3C. I know it's nitpicking, but I just wanna know, is there a way? EDIT: people seem to misunderstand what I'm asking here: I want to find a way to effectivly change the text being ...

Is it wrong to change a block element to inline with CSS if it contains another block element?

I know it's wrong to put a block element inside an inline element, but what about the following? Imagine this valid markup: <div><p>This is a paragraph</p></div> Now add this CSS: div { display:inline; } This creates a situation where an inline element contains a block element (The div becomes inline and the p is block by defau...

W3C Compliant WYSIWYG?

Could someone recommend me a WYSIWYG editor that is W3C compliant and has decent functionality? T.I.A. ...

Displaying W3C compliance

I think most people agree that complying with W3C standards is a worthwhile pursuit. However, do you advertise the fact that your site is compliant? Are there positives or negatives to doing so? If you do display your compliance, how do you do it? ...

How to create W3C- or Gmail-esque #anchor "links"?

If you use Gmail, you'll see URLs in the address bar like: https://mail.google.com/mail/#inbox https://mail.google.com/mail/#starred If you go to one of these URLs, it will jump straight to the corresponding view. A similar example is on http://validator.w3.org where the anchors #validate_by_uri, #validate_by_upload and #validate_by_inp...

Is it true that newsletters in HTML should have a "table-based" layouts?

I read somewhere that when creating a HTML email, you should use the table-based layout. You should not be care about creating tableless css based layout. Is that true? I have to create a newsletter layout for my company, but I dont feel confortable writing 3 nested tables. ...

Official docs for the XML content escaping?

I'm looking for docs on the "official" way to escape stuff in XML. Like the full list of the "&lt;" constructs (whatever they are called) and how to use them. I'm not asking for how to do it, just the official docs (or a good, reliable and correct tutorial). ...

Is it illegal to have unused namespace declarations in an XML document?

For instance, is the following XML document considered valid as per the W3C XML 1.0 recommendation? Notice that the namespace 'future' is not referenced anywhere in the document. Although this may not be considered good style, my belief is that the document is still valid regardless of the unused namespace. Can anyone confirm or refu...

Difference between <acronym> and <abbr>?

Definitionally they seem the same, yet they are deemed dissimilar enough by the W3C to have separate tag definitions. What is the semantic difference between <acronym> and <abbr> in terms of linguistics, the HTML spec and interpretation. ...

XML Output in Java -- what's with DOMImplementationLS ?

I just had to write the following stupid class to avoid going insane: import java.io.OutputStream; import org.w3c.dom.Document; import org.w3c.dom.bootstrap.DOMImplementationRegistry; import org.w3c.dom.ls.DOMImplementationLS; import org.w3c.dom.ls.LSOutput; import org.w3c.dom.ls.LSSerializer; public final class XMLSerializer { pu...

How do I submit suggestions to the CSS spec?

Recently I've wanted to do a number of things using CSS only to find that the best solution is to use Javascript. This has made me wonder, does anyone here know how to go about making development suggestions to be implemented into CSS 3 spec? It would be great if we could get some sort of feature request/vote based system going that the...

Can a label only refer to input elements?

W3Schools have this to say about labels: The <label> tag defines a label for an input element. [Emphasis mine] Does this mean that the following HTML isn't valid? <html> <body> <label for="x">Label</label> <hr> <div id="q" contentEditable="true">Hello</div> <hr> <div id="x" contentEdi...

Is Scala/Java not respecting w3 "excess dtd traffic" specs?

I'm new to Scala, so I may be off base on this, I want to know if the problem is my code. Given the Scala file httpparse, simplified to: object Http { import java.io.InputStream; import java.net.URL; def request(urlString:String): (Boolean, InputStream) = try { val url = new URL(urlString) val body = ur...

Coding for IE vs Coding for W3C Standards

Another chapter from the "arguments between myself and the other senior developer" series :P My position is that when doing web development, browser code should be written first and foremost to adhere to the W3C web standards, even though Internet Exploder has the greater market share (anywhere between 51% and 79% depending on who is do...

My HTML INPUT is not valid markup, please help

Hi On my web site, I have the following code: <input type="image" src="images/btn.png" alt="Submit" border="0" height="25" width="102" /> When I run my web site through one of the many HTML validators, they prompt to inform me that: border height width are invalid attributes of the INPUT element. However, YSlow and Google PageSp...

(X)HTML & CSS definitions description in computer-readable format

Hi, is there any set of HTML & CSS definitions, like list of (X)HTML tags & their available properties (both with descriptions) and so on, and CSS properties (descriptions, browsers supporting and so on) in computer readable (ie XML, CSV, INI or so) format? Thanks in advance! ...

How to preserve newlines in CDATA when generating XML?

Hello, I want to write some text that contains whitespace characters such as newline and tab into an xml file so I use Element element = xmldoc.createElement("TestElement"); element.appendChild(xmldoc.createCDATASection(somestring)); but when I read this back in using Node vs = xmldoc.getElementsByTagName("TestElement").item(0); Str...

How handle the CSS3 Spec. in a useful way?

The CSS3 Specifications are in the main browsers partly implemented and you get very nice results with less code, but there are many reasons not to use CSS3. E.g. not downwardly compatible, probably not similar renderd views on different browsers, etc. So I'm asking myself: Which is the best way to use CSS3 anyway with a option to inter...

URI doesn't validate on W3C Markup Validator, identical direct input does

I'm trying to get a site to validate as HTML5 on the W3C Markup Validator. When I use the "Validate by URI" option, it generates a ton of errors, but when I copy and paste the HTML into the "Validate by direct input", it validates perfectly. When I run a diff on the two sources returned by the validator, the only differences are the Rail...

How do you make a HTML page determine which Button to click (when you press the Enter key) without JavaScript?

I have an ASP.NET page with two sections on it... one for registration, one for login... each having a submit button. When i'm in the login part of the page, i want the first 'submit' button to engage when 'Enter' is depressed. When in the registration part, i want the 2nd 'submit' button to engage when 'Enter is depressed. Problem: I ...