Sales
0161 215 3700
0800 458 4545
Support
0800 230 0032
0161 215 3711
Fast Chat

Welcome to UKFast, do you have a question? Our hosting experts have the answers.

Sarah Wilson UKFast | Account Manager

Web standards on the edge

Web standards on the edge

Although there are many reasons why the Web fails to render appropriately in browsers , the two main reasons today are browser bugs and ambiguities in the standards, says Ian Hickson, a software engineer at Google Inc. and editor of the W3C HTML 5 specification.

The emerging CSS 2.1 specification will be the first major W3C recommendation to address ambiguities and other "edge cases" -- real-world issues such as how browsers should react to invalid Web page content. HTML 5 will be the second.

"One of the big challenges is that the suite of standards we have right now are frequently not specified enough in certain circumstances," such as how to render a page when the markup is invalid, says Chris Wilson, platform architect for Internet Explorer at Microsoft Corp.

Hickson says that's changing.

"Until recently, W3C specifications tended only to talk about what should happen for the simple cases, without really discussing edge cases [such as] how to handle invalid content," he says. That left browser vendors no guidance when pages varied from the "main case" cited in the standard (see Hickson's example, below).

Today, the latest specifications for HTML and CSS are being held to a higher quality standard. "Nowadays, we are not only expecting a test suite covering all the required and optional features of the specification but also a certain number of implementations as well," says Philippe Le Hegaret, interaction domain lead at the W3C.

New standards must define what happens when erroneous content is found, and the working group strives to define all of the edge cases. "The standards community is also applying this level of quality to other specifications, like the Selectors API, Web DOM core and SVG," Hickson says.

But that quality comes at a cost: Finding all of those edge cases -- which can number in the thousands -- and defining them has been a long and arduous undertaking, Hickson says. Work on CSS 2.1 started in 1998, right after the release of Version 2.0, and it's still not finished. Work on HTML 5 started in 2003 and probably won't be final before 2012.

"There's a lot of talk now about the W3C really holding back innovation and progress. The working groups are just really, really slow," says Derek Featherstone, group lead at the Web Standards Project.

Hickson's example

Changing the "type" attribute dynamically

HTML 4 has an input element, which has a type="" attribute, which takes values like "text" and "checkbox." What should happen when you have an HTML input element with type="text" in a document is reasonably well defined: You display a text field.

What should happen with input type="checkbox" is relatively well defined. However, with script, you can take the type="text" attribute, and change its value dynamically, while the user is editing the control, so that it is type="checkbox." This is not a common thing to do, and the HTML 4 and DOM2 HTML specs are completely silent on what should happen when this case is hit.

The result is that different browsers do different things; IE will throw an exception, if I recall correctly, while Firefox will change the text field to a checkbox.

Another question is what should happen if the value is changed back. Should the value the user entered be put back in the text field, or should it reset to the default value? Or, if there is no default, should it use the value that would have been submitted for the checkbox namely, "on")?

-- Ian Hickson

Editor, W3C HTML 5 specification

"The W3C process seeks a balance between speed of progress and fairness in listening to all voices," says Le Hegaret, adding that the working groups face trade-offs when timelines are shortened.

But some worry that delays could tempt browser vendors to once again veer from the standards path. "Lengthy processes don't benefit this kind of innovation," says Arun Ranganathan, standards evangelist at Mozilla Corp.

It has also made attaining a truly final version of a standard difficult -- and that has some developers frustrated. "We don't even have a perfect implementation of CSS 2.1 yet," Featherstone says. Features that he needs are still missing from the specification, such as a way to create rounded borders in style sheets.

Eric Meyer, a prominent Web developer, author and principal at Complex Spiral Consulting, says he'd like to be able to use nonrectangular shapes in layouts. "Instead of a div [tag] creating a rectangle, I'd like to have it create a hexagon. Or I'd like to define an L-shape so the top part of an article could go full width then go to one column."

"There's some frustration that we don't have the tools that we need," Featherstone says.

Meanwhile, the W3C is already well into the standards process for CSS 3, which has several modules in the Candidate Recommendation stage (it still must move forward to become a Proposed Recommendation before being approved as a final W3C Recommendation).

But there's a difference between adding new features, which are going into CSS 3, and testing and deploying the already specified features in CSS 2.1, says Le Hegaret.

One major roadblock to finishing CSS 2.1 is the test suite that still needs to be finished. That's a big job. One member submitted about 3,000 tests for CSS 2.1 in August. The group could move the deadline up, but there's a trade-off: "Should the group try to finish sooner, or have more implementation support -- and a better specification -- even if that takes longer?" The group hopes to have the CSS 2.1 specification completely finished in 2009, Le Hegaret says.

Freelance Web developer and author Peter-Paul Koch, who is known for his publication of browser compatibility tables at Quirksmode.org, says the W3C is doing a better job moving out of its ivory tower and becoming more attuned to real-world needs. But it wasn't always that way. For example, when W3C specifications were vague as to how to embed a plug-in into a Web page, the W3C specified that developers use the object tag. But most browsers already supported the HTML embed tag instead.

That didn't make much difference to the browser user, but it created a major dustup in the Web styles community. Today, it is expected that Web sites will use both. "This was an example of the W3C not paying attention to what's happening in the real world," says Le Hegaret. That's something that the W3C has strived to remedy as work on CSS 2.1, CSS 3 and HTML 5 continues.

With so much of the browser world using open source, Ranganathan says he has been pushing the W3C to adjust to the open-source community's more open, collaborative model. Working groups have traditionally been closed and emphasized face-to-face meetings. "Now the Web Apps working group and the HTML 5 working group conduct themselves in the open [and] the public can comment on the spec," he says. "That's a change in the modus operandi."

No responsibility can be taken for the content of external Internet sites.


print this article

Return to internet news headlines
View Internet News Archive

Share with: