A XHTML document or An XHTML document
When writing this sentence:
So it's possible to do an XHTML quine, but not a HTML quine
I noticed that I used an
for XHTML but not for HTML. In the discussion on this thread, I've picked up on a few points:
Use an when the following sound is a vowel-sound. The letter X is pronounced eks ... so an eks-em-el code.
And,
XML code, by the way, is not singular. "An XML code" sounds as odd as "a C code" or "a Visual Basic code". You could say "an XML tag" but "XML code" refers to any quantity of code written in XML.
As well as,
- XML stands for "Extensible Markup Language." (not "extended")
Therefore it seemed more natural to type an
for something that's singular (document) and begins with an x. It seems like the "ex" in "extensible" is similar to the "ex" in "extra", since you pronounce the consonants in the XML
acronym. Is it incorrect to use an
in this case?
Solution 1:
Generally, you use "a" or "an" based on the way you pronounce the acronym (and not its expanded form). The fact that "ex" is the start of either "extensible" or "extended" has nothing to do with the way the letter X is pronounced (which also turns out to be "ex").
So if you pronounce it "ex-aitch-tee-em-ell document", prefix it with "an" (an XHTML document).
Similarly for HTML, "aitch-tee-em-ell" still starts with a vowel, so you'd use "an" for it as well.
So this form:
So it's possible to do an XHTML quine, but not an HTML quine
would be correct.
Now, an acronym like SQL is more contentious, because "ess-cue-ell" and "sequel" are two ways to pronounce it, one with a vowel and one without, so "a SQL database" and "an SQL database" are both valid depending on how you pronounce it.
Solution 2:
The choice between a and an in English is almost wholly phonetical. One spells according to the sound. Some feel (and I agree) that really good English writing by native speakers of the language can (rarely) pay a certain homage to obsolete pronunciations, homage that occasionally leads to the unexpected usage of an where a nonnative would expect a. This subtle exception however has no bearing on the article for XHTML, nor is it ever expected of nonnatives. English uses "an X," therefore "an XHTML." For this purpose, one always without exception (as far as I know) ignores what the X might stand for.
Therefore, use "an XHTML" and likewise "an HTML."
Here's a puzzle or quiz for you, then: is it "a SCUBA-diving program" or "an SCUBA-diving program"? Answer: it's phonetical. If you pronounce "SCUBA" as "scuba", then it must be "a SCUBA-diving program."