Why should we adhere w3 standards while developing webpages? [closed] - html

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
In the UI development area there has been lot of emphasis on adhering w3 standards. I have very basic question why the webpages should adhere w3 standards. My specific questions are
(1) What are the top 10 reasons adhere w3 standards?
(2) What are the top 10 issues I will get if I don't adhere to w3 standards even though web page I have developed working fine?

As a web developer, adhering to w3 standards is strongly recommended, simply because browsers implement those standards. Without standards imagine IE 6-7 like stylesheets for every browser out there.
By coding to standards we do our but in giving users accross platform, browsers and screens that will get a uniform experience, that said there are a few things that browsers render differently. But with IE 9, Internet Explorer also started falling in line with other browsers.
Also, there are ton of libraries and frameworks that assume you have valid markup to work properly.
Just a demo, try and remove doctype declaration and open your site in IE.

See this link for info about HTML validation: http://validator.w3.org/docs/help.html#why-validate
I also like their saying WYSINWOG - What You See Is Not What Others Get because it's so true (a lot of the time, at least).

I think the answer to this question could possibly become a list, but the primary reason that stands out for me is compliance.
Your site may look fine to you among the browsers you are able to test on, but if you start to go outside the standards the chances of it working in browsers that you couldn't test goes down.
There's lots of browsers available today on an increasingly broad spectrum of devices with multiple versions available. Its just not possible to test everywhere.

You can validate your webpages against the w3 validator at http://validator.w3.org/
As for WHY keeping your pages up to standards is because those standards are there for a reason.
Your pages work fine for you. Have you tested how the pages look / perform in all browsers? IE 8+, Chrome, Safari, Firefox, Opera, SeaMonkey, etc.? Are you 100% sure your website is handicapped accessible?
When developers adhere to w3 standards, and browsers adhere to w3 standards, then the chance that users will have a consistent experience regardless of what browser they use increases. Visitors who don't have an ideal experience won't return. Adhering to the w3 standards increases the odds in your favor of a visitor having a positive experience, thereby increasing the chances that they will return.
One of the first things I learned when I started developing webpages/sites was to never let the phrase "It works on MY machine" be part of my professional vocabulary (except in jest). It doesn't matter how much a dev likes something or how well they perceive something to work - all that matters is the user's experience. If you have to bend over backwards to make the user's experience enjoyable then so be it - they are the ones who write the checks after all.

Related

Stingiest browser when it comes to cross browser compatability [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I know this is an opinion based question but I am hoping to dodge being closed because its not a personal taste question.
Which browser should i develop against that will show me that my code is most likely compatible across browsers? In other words, Which browser is the most strict on code? i.e. chrome seems to be the least strict..
My experience recently has been 0 bugs in chrome = 49 bugs in IE. I was wondering if I develop against IE would it be something like 0 bugs in IE = 11 bugs in chrome?
Using one specific browser to try and see how compatible it is with other browsers just doesn't really make sense. You should develop in a modern browser using standards compliance and best practises and then test in all browsers to ensure cross browser compatibility and graceful degradation in older browsers.
Google Chrome and Chrome Canary are widely considered the best browsers to develop with but modern versions of Safari and Firefox are also good.
You should develop for as many browsers as you reasonably can or want to target. Browsers aren't ordered by stringency; they each have their own quirks and oddities when it comes to the standards. So, assuming that something works in one browser (even the "most stringent") doesn't guarantee anything about what it looks like in another.
Standard code will work on any major browser. I develop on chrome and then check it against Internet Explorer. IE used to be terrible at being standards compliant but is much better in recent releases.
If it works in IE 7 or 8 without any IE hacks then it should work everywhere.
Of you use a framework like Twitter bootstrap and jquery then it should look the same in all browsers. And it would be easiest to keep up to date.
Lynx.
It's still in active development. Still has a small user-base. And it doesn't support JavaScript, Flash, images, or video.
If it works in lynx, it works on any remotely recent browser.
If you're not concerned with that level of compatibility, you're generally safe developing for the lowest popular version of IE among your site's visitors, using MDN or some other non-Microsoft reference as your resource (so as to avoid using IE-only features).
Well,
I call it not for nothing Internet Exploder. IE is a major pain in the ass, especially IE7 and 8. If you can get it working there, well lad, than you are ready for big projects.
Besides, check your site stats (with Google Analytics perhaps) and see which browser your users are using.

Is it time to switch for HTML5 and CSS3? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Should i be using HTML5 and CSS3?
How do you decide if you need to use html5 and css3? and what will be the pros and cons in choosing that approach.
Pros and cons I can think of:
Pros:
cleaner codes
support for #font-face
shadows and rounded corner
animations
Cons:
not all browsers supports
Can you help me decide? How do you decide if you're in my situation?
Thanks!
It won't be time to switch to "HTML5 and CSS3" for a very long time indeed.
It is time to look carefully at the features added by HTML 5 and CSS 3 and decide, on a case by case basis based on:
Browser support
Consequences of using them in browsers that don't support them
Benefits gained
Fallback options available
… which specific features it is worth using today.
A well designed site should always degrade gracefully and both HTML and CSS support this. The goal should not be to make your look fantastic in older browsers - only to make your site USEABLE in older browsers. A well designed site should be useable with CSS turned off.
I think a clear YES can come only after the target browsers are compatible. However, if my target browser supports the specific features of HTML5 and my development is limited to these supported features, HTML5 can be used.
Some people still use browsers once used by the ancient egyptians, like IE6, and they will not be able to view your pages (and specifically new styles/tags).
If you have a public website, accessable to virtually anybody, I suggest waiting for at least a couple of years before the big convert.
If, on the other hand, you have a controllable group of users, like the intranet site I'm working on, you can easily enforce the use of more modern browsers that support this, like Google Chrome, Apple Safari, Mozilla Firefox, of Internet Explorer 9 (just released).
I believe it is entirely down to who you are targeting. If you are targeting developers, Stack Overflow for example, then I think you can use the new technologies. If you really need to display a message to upgrade then I am sure developers would understand.
You should not use it for general sites for something such as a shop which has a very wide audience. This is because a lot of them would be using IE 6 - 8. The fact that no one on XP (my whole office + pretty much everyone else I know) can upgrade to IE9 which supports some features is frustrating too.
So I don't think there will be a definitive day where everyone can use it. It is just a case of looking at the market share of browsers and your target audience and deciding if it is worth giving 99% of people a better experience and ignoring the other 1%. Although I am sure those figures are completely off, it is probably a lot worse.
In conclusion, it depends on your audience and if you are willing to not support a varying number of users.

Is it a good idea to use HTML5 now? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I know it will be 'finalized/made official' in 2012 (and something to do with it being given 'Recommendation status' in 2022), but I'm wondering if it's a good idea to make a site using HTML5 now.
A simple portfolio sorta site? Given that most users (most people using IE) won't have support for it, although IE9 (shock) will be shipping with support.
There is no one monolithic HTML5. HTML5 is being developed as a single large (oh so very large) document, yes, but that doesn't reflect reality(*).
That is to say, HTML5 is a collection of loosely related incremental improvements to HTML4. Some of those new features are widely implemented already. Some of them you can safely use knowing that they'll degrade usefully for old browsers. Some of them you can use as long as you add explicit fallback code. Some of them will be shutting out some browsers for the foreseeable future. Some of them will only ever have minority support. Some of them may never be implemented at all, or may yet be edited out of the standard. And many new features that are often regarded as being “HTML5” aren't in HTML5 at all, but other standards (CSS3, ECMA262-5, DOM extensions, WebSocket...).
You will have to pick and choose which the features of the New Web you want individually, judging by current and apparent future support. There's not a switch for ‘using’ vs ‘not using’ HTML5, other than merely the doctype itself (which doesn't get you any new behaviour).
*: This was a big mistake, in my opinion. It would have been better to quickly standardise the bits that were already supported by everyone—like HTML3.2 did after the HTML3.0 fiasco (XHTML2, anyone?)—and then add new features in a more modular fashion. But that's not what happened, and it's too late to do much about it now.
It is a good idea to prepare your website for HTML5, but please be backwards compatible to allow users with a browser that is not yet "ready" for HTML5 to be able to view your site, event if that means limited functionality. That way, users with the latest browsers will reap full benefits, but those of us who are not on the bleeding edge will still be able to view content. As you can see, I feel somewhat strongly about this topic, but hey, I'm a realist.
Also, keep in mind that there are technologies like Silverlight and Flash, today, that can support rich functionality, if you want to allows non-HTML5 compatible browsers to also view such content.
There are people that wanna be progressive, those are the ones that bring the change, and I figure your one of them. So my advice would be, sure, cool, use it, just with care that users whose browsers don't support it also have decent experience.
Things that might help:
http://code.google.com/p/html5shiv/
("Public repo for the latest HTML5 JavaScript shiv for IE to recognise and style the HTML5 elements. ")
Also, as new user i can't post more than one link, but look for css3pie:
("PIE makes Internet Explorer 6-8 capable of rendering several of the most useful CSS3 decoration features.")
Once IE 9 is released, all major browsers vendors will support a large subset of HTML5. http://caniuse.com is a very useful site for answering the question "Which HTML5 related feature can I use now (or in the near future)?"
Updated (to address #Crusader's comment):
By some measures the market share of browsers without at least some HTML5 support (i.e. IE 6,7,8) is now lower than 50%. In other words, the era of HTML5 has already arrived.
With the arrival of IE 9 soon, I predict the share of browsers with no-HTML5 support will fall to less than 25% in the next 12 months. And for those who refuse to upgrade (or can't because of corporate policy), Chrome Frame allows easy use of HTML5 in IE 6,7, and 8 for sites that need to support those browsers.
Or consider: the only reason MS is implementing HTML5 features in IE 9 (instead of continuing to put all its eggs in the Silverlight basket) is because they know HTML5 has already arrived and they are late to the party.
Certain bits of HTML5, sure. Almost all new elements introduced in HTML5 can be used already, thanks to the html5shiv, and if you provide a suitable fallback you could be using <video> and <audio> as well. Those, along with the more advanced scripting features (local storage, etc.) are the features that will take time to implement.
Also, while Mark Pilgrim's Dive into HTML5 mostly discusses features that won't be available for some time (at least not in IE, i.e. the majority of web users), the chapter on semantics is both interesting and applicable.
Also keep in mind what your target audience is; if most of your visitors are from the designer community (or whatever), most of them probably have a browser with HTML5 capabilities. WebKit browsers already support much of the HTML5 draft.
The thing you should understand is that html5 is not ONE big thing, it is a lot of bits and parts that you will start to use envtually here is a extract from Dive into HTML5
It’s not one big thing
You may well ask: “How can I start
using HTML5 if older browsers don’t
support it?” But the question itself
is misleading. HTML5 is not one big
thing; it is a collection of
individual features. So you can’t
detect “HTML5 support,” because that
doesn’t make any sense. But you can
detect support for individual
features, like canvas, video, or
geolocation.
You may think of HTML as tags and
angle brackets. That’s an important
part of it, but it’s not the whole
story. The HTML5 specification also
defines how those angle brackets
interact with JavaScript, through the
Document Object Model (DOM). HTML5
doesn’t just define a tag;
there is also a corresponding DOM API
for video objects in the DOM. You can
use this API to detect support for
different video formats, play a video,
pause, mute audio, track how much of
the video has been downloaded, and
everything else you need to build a
rich user experience around the
tag itself.
If you are really interested you will find this very interesting!
Realize that html5 is a blanket term. Using the doctype is just the start. I wouldn't start including advanced webkit animations in all your sites, but using border-radius and box-shadow will work with most(minus ie) browsers and degrade gracefully.

HTML 5 - Who, What, Where [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am looking at HTML5 information at W3. Some of the new functionality seems interesting.
Which browsers support it?
How can I ensure that I am using HTML 5?
Is there a way to be told that "there is an HTML 5 command you should be using" if I use something in HTML 4 or what not?
HTML 5 Canvas is supposed to allow a lot of Flash type functionality no?
AFAIK, webkit-based (safari, chrome, etc.), firefox, opera, and IE 8 support some, not all, of the HTML 5 features. Things like video are inconsistent as Apple/Webkit want H264, which mozilla is against (they prefer ogg or something) because of licensing issues.
Use feature detection and the HTML5 doctype. I'm not well read, but you can read up some here.
Canvas is supported by all browsers -- except IE, but Google provides excanvas to allow IE to support canvas (it's slower than a native implementation). Canvas provides a location to directly draw on the screen.
For some examples of canvas usage see processing.js and Bespin. Canvas is definitely capable for drawing at a decent speed, excluding the useless IE.
There's information in the WHATWG spec itself, look for the browser icons in the boxes to the left of each sections. And there's the Wikipedia page, which should be quite up to date (disclaimer: I do a lot of the maintenance there).
The best guide to HTML5 compatibility I have found (by a mile) is this:
http://a.deveria.com/caniuse/#agents=All&eras=All&cats=HTML5&statuses=rec
A general info and other resources can be found here:
http://prezi.com/vo2ommkmkl_w/
HTML 5 Browser Compatible Charts with detailed info
http://www.findmebyip.com/litmus/
Which browsers support it?
HTML isn’t one thing. Different browsers support different parts of it.
Mark Pilgrim’s Dive into HTML5 is a good reference.
How can I ensure that I am using HTML 5?
http://html5.validator.nu/

What browser is best for testing web standards? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
When I build a site, I'd like to have at least one browser I can show it off in without any hacks or workarounds, and yet still retain maximum functionality. Knowing that none of the browsers have perfect standards adherence, which one comes closest?
Also, are there any standards areas in which a single browser seems to specialize? Opera, for instance, seems to be bent on adhering to all voice-related CSS standards.
The way most people I know work is to run Firefox(with Firebug) and develop in that. Firebug is an invaluable tool for debugging. They will usually take what the get there and try to squeak it into IE and other browsers. Not exactly the answer to your question (Its not 100% compliant but its close), but hopefully it helps.
Safari using the latest WebKit nightly build.
Not that any browser in the world uses this yet (not even Chrome) but if all you're worried about is standards then that's your best bet - it passes Acid3, something no browser on the market can do yet.
This is an excellent question, but I find it hard to give a single answer. Traditionally, Opera has been the most standards compliant. For a long time, it was the ONLY browser to pass the ACID2 test in fact. FireFox and IE haven't been able to claim that (although supposedly IE8 is supposed to fix that, and FF is working on it all the time).
That having been said however, bear mind that IE has the largest "market share" of all the browsers right now (businesses have ties to MS, and Windows always comes with IE out of the box) followed closely by FireFox. So if your goal is to show off your app in a browser that most people will be using, it'll have to be one of those.
Purists will tell you that FF is more standards compliant than IE7 (and they are right), so that you should design for that and not IE. I can tell from many years as a designer/developer that pages taking that approach may not be a great idea. Bear in mind again - IE has the market share, and usually where it counts. So if it looks great in FF but breaks in IE, most users will be very upset, and the same vice-versa.
Best compromise - concentrate on those two. Tweak it to look right in at least FF AND IE, and now you've covered 90%+ of the people that will be using your website.
Don't get me wrong here - I'm not trying to dismiss the users of Opera, Safari, or any other browser. But if you want the most results for the least amount of work, then there ya go.
Best answer - take your time, do it right, test ALL the major browsers. The time spent working through these browser headaches ahead of time (when you can do it at your own pace) will be well rewarded. Compare that to the screaming client who wants to know why your page breaks in his favorite browser, and wants it fixed today. :)
"When I build a site, I'd like to have at least one browser I can show it off in without any hacks or workarounds, and yet still retain maximum functionality."
If you are testing your site, you would be better served to choose target browsers based on your users' needs.
Unless you are in a position where you can force your users to change to a particular browser, you need to test your site in whatever browser(s) they use.
Opera comes closest to standards compliance.
I use Firefox with IE tab and chrome. Firefox with IE tab because those are the two browsers with the most market share and chrome because it is one of the few windows browsers that use webkit, meaning it should display similarly to safari.
The way most people I know work is to
run Firefox(with Firebug) and develop
in that. Firebug is an invaluable tool
for debugging. They will usually take
what the get there and try to squeak
it into IE and other browsers. Not
exactly the answer to your question
(Its not 100% compliant but its
close), but hopefully it helps.
+1 - I prefer firefox for most browsing as I find it most stable and easiest to use, but when it comes to web development it takes the cake when combined with firebug! The others are good for testing, but I find that firefox+firebug makes everything so much easier to use
Try Google Chrome it uses the WebKit which is feature complete for the latest standards.
I used to use Opera and Firefox as my "Standards Compliant" browsers, but I've recently become much enamored with Safari. The WebKit under the hood is really solid, the javascript is really fast (or fast enough, anyway), and and the CSS support is pretty excellent. It's not perfect, but does a really solid job of doing what it's supposed to do.
Also, it has the greatest print-screen feature I've ever seen in a browser. Seriously. Whereas every other browser seems to really munge up any screen I try to print, Safari always seems to get it right. A minor thing, but worth major points in my book.
Edited to add: Chrome is coming close to taking Safari's place, but that print screen thing is still the deciding factor. Being able to just hit "print" during a meeting with a client and not have to fiddle with any settings to get it working right is a major relief.
Don't just use a standards compliant browser, use other tools such as the w3c validator.
I find that if you stick to standards compliant markup, and don't use anything too unusual, it will render fine in Firefox 2/3 and Safari/Chrome (and usually fine in IE7/8). If not, you're probably better off trying to simplify your markup, rather than introducing hacks and workarounds.
Using one browser for all your testing and then hacking it for others is how most people do it but that often leads to problems. Even though Safari may be a more standards compliant browser it is not a highly popular browser and I'd lean more toward using the browser your customer's are using most while writing 100% standard code and then adjusting for idiosyncrasies of other browsers. It's not ideal but it is more customer centered thinking.
I've seen web development companies with multiple full time employees that had bugs on their homepage because they did exactly what you seem to be thinking is your answer. They developed the webpage on a Mac and tested exclusively with Safari. The result was that over 60% of potential customers may have seen layout bugs if their browser was windowed.