现在的位置: 首页 > 综合 > 正文

对Web标准的9大误解

2012年04月18日 ⁄ 综合 ⁄ 共 3430字 ⁄ 字号 评论关闭
Misunderstanding #1: "We Need Separate Print Pages"
This is old news, but why do I consider it noteworthy? Because it's the #1 application where media-dependent CSS, on top of media-independent HTML, ought to come into play... and yet, and I'm guessing, only 5% of all pages make use of it. You'd think after years of evangelizing done by web developers, the likes of CNN or Wired would have gotten the point.
Misunderstanding #2: "We Need an Alternative Mobile Web on Top of the Existing Desktop Web"
WML, the WAP's Wireless Markup Language, is dead today for a good reason: there was no need for this species in the course of web evolution. Even before WML was invented, plain vanilla HTML was created to be media-independent. Not by accident, but by design, because platform-dependence was one of the main problems Tim Berners-Lee tried to solve when inventing the World Wide Web and HTML.
Misunderstanding #3: "Accessibility Means to Always Use Alt Text"
The meaning of alt text is to serve as replacement (hence, "alternative") when the image the HTML intends to serve cannot be seen. There's a variety of reasons for that to happen; the user is blind, the medium doesn't support images, the user disabled images on purpose so she can browse on low-bandwidth, or the Googlebot comes around to visit.
Misunderstanding #4: "Sites Always Become More Accessible With CSS"
The biggest advantage of CSS is simply that it helps developers create websites much faster by separating layout and content. As far as that's possible, and it's certainly not possible 100% – which brings us to our next point.
Misunderstanding #5: "With CSS We're Completely Separating Content and Layout"
CSS doesn't completely separate content from its layout – only a template system can do that. CSS has its place on top of the template system, and greatly simplifies the HTML (if you think there's div soup today, you've got to see true 1996 table soup... it's worse.)
Misunderstanding #6: "With CSS, You Can Do the Design Later"
The real problem I'm seeing here, however, is that some people – heck, I was often one of them – tend to forget to add a fine-tuned design at all, happily using valid HTML + CSS as excuse for not having a page layout (relying on user stylesheets alone is not an option). Have you ever come across one of those black-on-white sites of nothingness, where the only graphical element is a "valid HTML" badge?
Misunderstanding #7: "The Web's Becoming More and More Accessible Every Day"
I think the biggest factor making accessible web sites a reality today is that most people simply don't do HTML anymore – they use ready-made blog templates. And several blog templates deliver good, strict (X)HTML.However, there's another movement throwing needles at the high-flying balloon of accessibility, and partly, usability; it's The Return of JavaScript (Episode III: A New AJAX).
Misunderstanding #8: "The Semantic Web is Just Around the Corner"
Today, the W3C is putting much of its efforts behind the Semantic Web (also described by Tim Berners-Lee in the second part of his book Weaving the Web). But Cory Doctorow put it so well back in 2001: people lie, and people are lazy. And I got a feeling even the W3C misunderstands why some of their web standards took off (they are relatively simple to apply, and certain complexities can be ignored without dangers), and I also got a feeling lower-case semantic web AIs, e.g. Google's Q&A feature, will be quicker to show results.
Misunderstanding #9: "CSS Hacks Are Always Superior"
Those hacks are fun, sure, but are they superior to HTML table layout hacks? Well, a little, but CSS hacks are still just that: hacks. Workarounds that will cause troubles with every new browser. Workarounds the new developer won't get when you're away, unless she's a CSS expert. So instead of thinking that CSS hacks are a great way of developing websites, it's better to use them sparingly and accept them as what they are: an often necessary evil.

Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=835765

抱歉!评论已关闭.