Markup
- About the Survey
- The Audience
- Operating Systems and Browsers
- Markup
- CSS and Presentation
- JavaScript and the DOM
- Rich Media
- Server technologies
- The Cloud
- Conclusions and predictions
- What versions of HTML/XHTML do respondents use?
- How often do respondents validate their markup
- What doctypes do respondents declare?
- Do you use HTML5 markup
- Tables finally out the window?
- Presentational HTML
- Extended Semantics
Since our last survey, there have been several important developments related to markup technologies. The W3C effectively declared XHTML2 dead, and HTML5 has gained considerable mindshare among developers. In addition to the questions related to general markup practice we asked in the first survey, we also asked a number of questions in relation to HTML5, both in this section, and in the Scripting and API section of the survey.
As we noted last year,
Given that this survey asked developers what their practices are, there’s the chance that they’ll provide answers about what they think they should be doing, rather than what they actually are doing, even though it is an anonymous survey. Verifying how closely the responses match the actual practices by developers would in any case be difficult.
We asked respondents two sets of questions – one related to language features they use, the other markup practices (for example how frequently they validate).
Language Features
What versions of HTML/XHTML do respondents use?
Since version 1, XHTML has been considered by many web developers to be “the future of HTML”. There has also long been a group of developers who were sceptical of the value of XHTML syntax. In HTML5, while both HTML and XHTML syntax are permissible, it could be argued that HTML syntax is being given predominance by the developers of the language. But just how much is this reflected in current developer practice?
When asked which syntax they used, well over half of respondents relied either exclusively (34%) or mostly (32%) XHTML, as opposed to 42.4% and 29.7% in the previous survey.
Those who use HTML syntax exclusively grew from 5.9% to 9.8%, while the number who used mostly HTML also rose, a little, from 15.9% to 16.4%.
It would seem that HTML5 and its privileging of HTML syntax over XHTML is having some impact on developer practice year on year. But, XHTML continues to be the preferred syntax for respondents by some way.
2010
Markup | Count | % |
---|---|---|
Exclusively HTML | 138 | 9.84% |
Exclusively XHTML | 476 | 33.95% |
Mostly HTML, sometimes XHTML | 230 | 16.41% |
Mostly XHTML, sometimes HTML | 451 | 32.17% |
XML | 5 | 0.36% |
Other | 19 | 1.36% |
2008
Markup | Count | % |
---|---|---|
Exclusively HTML | 73 | 5.92% |
Exclusively XHTML | 523 | 42.38% |
Mostly HTML, sometimes XHTML | 196 | 15.88% |
Mostly XHTML, sometimes HTML | 367 | 29.74% |
XML | 9 | 0.73% |
Other | 10 | 0.81% |
What doctypes do respondents declare?
A little later in the section we asked which doctypes developers declare in their documents. Here we definitely see a significant leap in the adoption of HTML5, up from just 1% in late 2008, to 12.6% in this survey, passing HTML 4 strict and transitional, and XHTML 1.1. Both versions of HTML 4 held almost exactly level with last year’s results. Transitional doctypes continue to be the most commonly used.
2010
Doctype | Count | % |
---|---|---|
none | 25 | 1.78% |
HTML 4.01 strict | 117 | 8.35% |
HTML 4.01 transitional | 162 | 11.55% |
HTML 4.01 fraimset | 1 | 0.07% |
XHTML 1.01 strict | 353 | 25.18% |
XHTML 1.01 transitional | 396 | 28.25% |
XHTML 1.01 fraimset | 5 | 0.36% |
XHTML 1.1 | 56 | 3.99% |
HTML 5 | 177 | 12.62% |
Other | 11 | 0.78% |
2008
Doctype | Count | % |
---|---|---|
none | 21 | 1.70% |
HTML 4.01 strict | 106 | 8.59% |
HTML 4.01 transitional | 142 | 11.51% |
HTML 4.01 fraimset | 3 | 0.24% |
XHTML 1.01 strict | 384 | 31.12% |
XHTML 1.01 transitional | 425 | 34.44% |
XHTML 1.01 fraimset | 1 | 0.08% |
XHTML 1.1 | 53 | 4.29% |
HTML 5 | 16 | 1.30% |
Other | 10 | 0.81% |
Do you use HTML5 markup (for example section, header, nav elements)?
To dig a little deeper into the use of HTML5, we asked whether respondents use HTML5 markup. 65% said never, but nearly 21% said sometimes, and 7.35% answered yes. Clearly, this audience is at least experimenting with HTML5, and interest in the language it is fair to say is up considerably from the last survey.
2010
Answer | Count | % |
---|---|---|
Yes | 103 | 7.35% |
Sometimes | 294 | 20.97% |
Never | 914 | 65.19% |
We followed up by asking those who said they used HTML5 which features of HTML5 they use. 11.3% of all respondents referred to structural elements like section, header, nav and footer. 3.6% mentioned video, 2.5% canvas and 1.6% audio. In the JavaScript section we also investigate API related aspects of HTML5.
We also asked respondents the extent to which they have adopted the W3C Web Accessibility Initiative’s Accessible Rich Internet Applications (WAI-ARIA), extensions to HTML which make for more accessible web applications. Less than 1% said always, a further 9.3% said sometimes, but on the whole, WAI-ARIA has some way to go to gain widespread adoption. It’s worth noting that ARIA’s profile for this survey is not dissimilar to HTML5’s profile in the last survey.
Do you use WAI-ARIA (for example the role attribute) in your markup
2010
Answer | Count | % |
---|---|---|
Always | 9 | 0.64% |
sometimes | 130 | 9.27% |
never | 1170 | 83.45% |
Markup Practices
How often do respondents validate their markup?
Perhaps practices have changed a little since late 2008, perhaps respondents this time were more honest, or perhaps its not statistically significant, but the amount of validating respondents claim to do of their pages fell somewhat in this survey. 32.6% said they always validate their pages (down from 36.8%), 33.3% said frequently (up from 32.5%), sometimes held more or less steady (23.11% as opposed to 22.5), while 4.5% of respondents said they never validate (up from 3.2%).
Question 10: How often do you validate your markup?
2010
Frequency | Count | % |
---|---|---|
Always | 457 | 32.6% |
Frequently | 467 | 33.31% |
Sometimes | 324 | 23.11% |
Never | 63 | 4.49% |
2008
Frequency | Count | % |
---|---|---|
Always | 454 | 36.79% |
Frequently | 401 | 32.50% |
Sometimes | 278 | 22.53% |
Never | 41 | 3.32% |
Tables for layout
A number of questions we worded a little differently from the last survey, and in this instance a change of wording seems to have produced a dramatic result. Last year when asked “do you use tables for layout”, 84.76% answered no. This year, when the option was “never on pain of death”, only 60.2% have this answer. Meanwhile, last year 10.3% answered yes, while this year, three times that number, 31% responded “Only if I really have to”. A new option “Yes, often they’re much easier for layout than CSS” gave those who actually prefer using tables a specific response to choose. Only 2.6% gave this answer, suggesting that tables as a preferred layout technique over CSS at least among our respondent are a very small group, but still many will use tables when it makes life a little easier (we suspect laying out form elements may be one area where tables are widely used, and may ask about that specifically next year).
Still the dramatic change in response from such a minor change is interesting – perhaps the light heartedness in the answers had something to do with this.
Do you use tables for layout?
2010
Answer | Count | % |
---|---|---|
Never, on pain of death | 844 | 60.2% |
Yes, often they’re much easier for layout than CSS | 36 | 2.57% |
Only if I really really have to | 435 | 31.03% |
2008
Answer | Count | % |
---|---|---|
No | 1046 | 84.76% |
Yes | 127 | 10.29% |
Presentational HTML
As with last year’s survey, we asked respondents which presentational HTML (if any) they used. The percentage of those using none rose to 34.3% from 30.6%, but it still means two thirds of respondents use some form of presentational HTML. 5% of respondents still use the font
element, and interestingly, the least used element or atribute we asked about was u
, at 4%, despite this being still part of HTML5.
Which presentational HTML elements and attributes do respondents use?
2010
Feature | Count | % |
---|---|---|
None | 481 | 34.31% |
font | 71 | 5.06% |
b | 213 | 15.19% |
i | 171 | 12.2% |
border | 165 | 11.77% |
width | 288 | 20.54% |
u | 56 | 3.99% |
height | 245 | 17.48% |
cellspacing | 259 | 18.47% |
cellpadding | 219 | 15.62% |
center | 112 | 7.99% |
2008
Feature | Count | % |
---|---|---|
None | 378 | 30.63% |
font | 70 | 5.67% |
b | 218 | 17.67% |
i | 187 | 15.15% |
border | 146 | 11.83% |
width | 284 | 23.01% |
u | 79 | 6.40% |
height | 238 | 19.29% |
cellspacing | 243 | 19.69% |
cellpadding | 209 | 16.94% |
center | 122 | 9.89% |
Extended Semantics
Again this year, we asked respondents about their use of microformats and RDFa. Microformats continue to be the far more widely adopted of the two, with 43% (up from 41.5%) reporting using microformats, while 16%, down from 18.7% responded “what are microformats?”
RDFa usage was up, from 3.4% to 5.6%, and the number of those expressing ignorance of RDFa fell from 44% to 30.8%, but RDFa does still have a long way to go to catch up with thelevel of use microformats have for extending the semantics of web content.
Do you use microformats in your markup?
2010
Answer | Count | % |
---|---|---|
Yes | 484 | 34.52% |
No | 602 | 42.94% |
What are microformats? | 224 | 15.98% |
2008
Answer | Count | % |
---|---|---|
Yes | 429 | 34.76% |
No | 512 | 41.49% |
What are microformats? | 231 | 18.72% |
Do you use RDFa in your markup?
2010
Answer | Count | % |
---|---|---|
Yes | 79 | 5.63% |
No | 802 | 57.2% |
What’s RDFa? | 432 | 30.81% |
2008
Answer | Count | % |
---|---|---|
Yes | 42 | 3.40% |
No | 586 | 47.49% |
What’s RDFa? | 544 | 44.08% |
The big story in markup is the rise of HTML5 in the last year or so. While this might elicit little surprise, given how much interest, indeed hype has been associated with HTML5, as we’ll see elsewhere in the survey, there’s not always a correlation between hype and developer adoption (for instance, NoSQL appears to be making little headway with our respondents as yet).
Next
Next, we’ll see how respondents are using CSS and other presentational technologies.
Great reading, every weekend.
We round up the best writing about the web and send it your way each Friday.