Welcome Guest!

If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:

  • Receive Fast Advice
  • Learn Programming Languages
  • Get Professional Website Reviews
  • Quick Troubleshooting Assistance

> Importance Of Valid (x)html/css

This is a discussion on Importance Of Valid (x)html/css, within the HTML/XHTML section. This forum and the thread "Importance Of Valid (x)html/css" are both part of the Designing Your Website category.

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Importance Of Valid (x)html/css
Antti
post Feb 15 2008, 08:41 AM
Post #1


Rapid Squeezer
****

Group: Advisors
Posts: 275
Joined: 15-February 08
From: Finland
Member No.: 139



I've read few website critiques here and started to wonder why people always point out first that the html/css is not valid. I really don't think it matters that much. If the site works for 99% of users then what's the big deal if it doesn't have valid html/css? I try to do valid code but I'm not loosing any sleep if I end up having a site with few errors. How important do you think it is and why?


--------------------
anttisimonen.com - .NET developer

anttis.wordpress.com - Blog
Go to the top of the page
 
+Quote Post
karinne
post Feb 15 2008, 08:46 AM
Post #2


Co-Founder
*******

Group: Co-Founders
Posts: 2,799
Joined: 13-February 08
From: Squeezin'
Member No.: 2



I love a great debate ... thanks for posting that question biggrin.gif

Personally, I view the validator as a spelling checker basically. And it has saved me from some very stupid errors in the past so I ALWAYS validate.

Now ... sometimes, you put code that doesn't make it valid like maybe adsense stuff and in this instance, I agree with you, I don't loose sleep over that laugh.gif

A valid site doesn't make it BETTER in terms of semantics or better for web standards, it just makes sure you have all your tags closed, etc...


--------------------
The Squeeze Store is now OPEN! Come on in and grab something!

a web design portfolio | web non-sense - REDESIGNED!
I'm also on: del.icio.us | flickr | virb | facebook | twitter
The Web Squeeze is also on: virb | facebook | stumbleupon - JOIN IN!
Go to the top of the page
 
+Quote Post
unitedcraig
post Feb 15 2008, 08:59 AM
Post #3


Rapid Squeezer
****

Group: Advisors
Posts: 481
Joined: 14-February 08
From: Stockport
Member No.: 75



It is very important IMO

Browser display pages differently as i am sure you know.

Browers are built to be as near as possible to the W3C standards as possible, therefore, if you have validating code you site will look as near as perfect as it can get in the widest variety of browsers.

As for making it better, if can make it display better in browsers, this i think counts as better.

It is always good as well to know that as well as creating good designs, the person that is doing your site can create valid ones as well


--------------------

Working progress
Go to the top of the page
 
+Quote Post
Jason
post Feb 15 2008, 09:10 AM
Post #4


Master of the Universe
******

Group: Advisors
Posts: 1,157
Joined: 15-February 08
From: London, England
Member No.: 141



Put it this way. Its like speaking English. You can get your message across even when speaking it incorrectly. You can misspell words, make grammatical errors and misuse punctuation yet a person will still make sense of it.

However if you try to work in a professional environment with these written language flaws you will get no where at all. It is exactly the same in web design or at least it should be.

Perhaps a better example is with cowboy builders. They make a wall, it stands but what happens when there is a storm or some gales?

By writing valid code it shows that you know what you are doing. Your web pages will be displayed correctly across all browsers. It will continue to be displayed correctly into the future. By using semantic mark up your pages will be more search engine friendly. If you use CSS instead of tables the pages will load faster and be easier to modify in the future. This is the reason why it is so important to write code correctly.


--------------------
Go to the top of the page
 
+Quote Post
craig
post Feb 15 2008, 09:44 AM
Post #5


Fresh Squeezed
**

Group: Members
Posts: 30
Joined: 13-February 08
Member No.: 17



It definately seperates teh cowboys form the profesionals, and when u r deal wiv it all teh tyme, and ur anally retentive u appreshiate that perfct code is beuatiful.

See, you get the gist, but in my opinion, professionalism will get you further than a rushed job filled with the mistakes.

I too, use the validator as a spell checker, often I forget to put in a end slash for one of the elements. As far as ensuring cross browser compatibility goes, this unfortunately has little to do with validation (thanks microsoft!). The best thing for that is test test test, realise what works across browsers from experience, and you will soon find layouts which work flawlessly without hacks.

What is imperative in my opinion is the semantics of a website. If an element has a predefined tag (take the address tag for example) then we should be using that instead of shoving the different lines after <br /> tags! Same goes for tables, if you have tabular data, use tables! Just make sure they are accessible, make use of the thead, tbody, and tfoot tags as well as the th tag!

Anyway, I could rant about semantics forever, maybe I'll save it for another thread!

Craig smile.gif


--------------------
Craig Hamnett
Fast, Cheap, Good... choose two
Go to the top of the page
 
+Quote Post
rewake
post Feb 15 2008, 10:11 AM
Post #6


Rapid Squeezer
****

Group: Mentor
Posts: 223
Joined: 14-February 08
From: NY, USA
Member No.: 127



Hey guys,

OK, so there are things I agree and disagree with here.

I will agree that valid XHTML is really important when building a site. The fact that it shows you know what you're doing is great, but that's not the real point. In the real world no one actually cares if you know how to write valid XHTML, they just care that their site sells stuff & they make money! With that said, it's not about pretty code, it's about accessibility! The whole idea behind a the standard is that all browsers will be able to render the code in a way that will be readable. When I say "browser" I'm referring to anything that can render a web page. This includes devices for the handicaped as well. (see: Target accessibility lawsuit) Keep in mind though that many sites are still accessible even if they don't validate. (Google does not validate) Want to see what you site really looks like? Use LYNX.

Now, one thing I completely disagree with is that when you use valid XHTML your pages will magically look the same on every browser. huh.gif I wish it were that easy! The fact of the matter is that every browser has it's own perogatives and will do what's best for them, not the people writing the code. Let's face it, IE still retains roughly 70% of the browser market share. If they decided they wanted to change everything one day you'd fold your tail between your legs and do it. Not because you like it or agree with it, but because they hold such a large stake of the internet. And yes, I said internet, because most people don't care about the browser, they care about the internet. Remember, AOL is the internet. to_pick_ones_nose2.gif

One thing I'm actually looking forward to is the new WAI-ARIA (Rich Internet Application accessibility initiative), which defines a standard for JavaScript & Ajax.

Rich
Oh btw, I validate. Well, most pages anyways! tease.gif

This post has been edited by rewake: Feb 15 2008, 10:20 AM


--------------------
QUOTE
if ($name=='will') echo '/(bb|[^b]{2})/';

Raineri Jewelers | MySpace | Facebook | deviantART
Go to the top of the page
 
+Quote Post
Jason
post Feb 15 2008, 12:03 PM
Post #7


Master of the Universe
******

Group: Advisors
Posts: 1,157
Joined: 15-February 08
From: London, England
Member No.: 141



A note of browsers and validation. In the browser wars with netscape and internet explorer both companies came up with there own standards for different languages. There were browser specific tags and all sorts of silliness. Eventually W3C came along to straighten things out. They started producing cross browser standards. Do browsers follow these standards to the letter? Currently no.

However they are making strides towards it. IE8 has passed the ACID test. (renders a smilie face correctly using html/css). Firefox currently fails this test. I would expect future versions to pass these tests.

As time passes all major browsers will follow these standards. By writing valid code the site will stand the test of time.

From a time perspective, its far less time consuming to write a valid webpage, then apply an IE specific style than it is to write a piece of crap and spend hours trying to perfect its look across all browsers.


--------------------
Go to the top of the page
 
+Quote Post
paintingtheweb
post Feb 15 2008, 12:14 PM
Post #8


Squeezing
***

Group: Members
Posts: 70
Joined: 14-February 08
From: Las Vegas, NV
Member No.: 122



I tend to look at it very similar to Karinne. I just wanted to make the point, however, that having valid XHTML and valid CSS does NOT make it cross-browser compatible. Want an example? Check out www.motdidr.com. It has valid XHTML (Strict even) and valid CSS. Works great in Firefox and Opera, but looks horrid on IE. I don't disagree at all with having valid code, but I don't strictly live by it. I use it more for making sure that my code is written properly. I personally tend to think that a lot of designers (no offense to anyone, btw) tend to be a bit too doctrinaire on this subject.


--------------------


"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." Martin Golding
Go to the top of the page
 
+Quote Post
Daygon
post Feb 15 2008, 08:35 PM
Post #9


Rapid Squeezer
****

Group: Members
Posts: 120
Joined: 13-February 08
From: Houston, Texas
Member No.: 12



To me valid code shows that you know how to use what you know, just because a site is valid does not mean the person that coded it knows a lick about anything. << contradicting sentence... think about it

In todays world a blind monkey can code a site, but the experienced coder who does things to standards show a lot more integrity and have a much better chance of getting a job developing. its those that do it valid and find the ways to make the site work across browsers with consistency, and if you know css but you dont know how to make it consistent across browsers, but its valid, it dosent mean anything but you know code, and how to code, but you dont know how to use it.


--------------------
Jonathon Harrelson
Portfolio: InterAction Media Inc
Available for work
Go to the top of the page
 
+Quote Post
Ryan
post Feb 15 2008, 09:46 PM
Post #10


Rapid Squeezer
****

Group: Members
Posts: 123
Joined: 14-February 08
From: Hounslow, London
Member No.: 133



In my view, a validated site makes it a lot easier to fix problems when you're creating it. After that, I don't lose sleep over it.


--------------------
Go to the top of the page
 
+Quote Post
Monie
post Feb 15 2008, 09:52 PM
Post #11


Squeeze Machine
*****

Group: Members
Posts: 698
Joined: 13-February 08
From: Borneo
Member No.: 8



For me, I'll try to make my site as validate as it could be!
I hate the red alert popping up in my web developer tool bar with all the "CSS Error" message biggrin.gif


--------------------

Go to the top of the page
 
+Quote Post
Jasontor
post Feb 15 2008, 11:21 PM
Post #12


Squeezing
***

Group: Members
Posts: 66
Joined: 13-February 08
From: Mesa Arizona
Member No.: 26



It works in IE & FF, it functions correctly without any errors and the client likes it. That's how I validate my websites...

-Jasontor


--------------------
Go to the top of the page
 
+Quote Post
jamesicus
post Feb 16 2008, 02:04 PM
Post #13


Squeezing
***

Group: Members
Posts: 72
Joined: 16-February 08
Member No.: 157



Here is my personal assessment of Markup Validation:

Validation enhances interoperability -- correct rendering in all user agents. Pages can fail validation and still display pretty much as expected - sometimes exactly as expected - in graphical Browsers anyway due to their (albeit sometimes erratic) built-in Markup discrepancy compensation which commercial purveyors have built into their Browsers with great thoroughness. However, validation does catch many easily corrected Markup errors and the resultant code is consequently easy to maintain or change. Pages containing invalid Markup may not display or function correctly in screen Readers, BRAILLE interpreters and Textual Browsers or when incorporated into other applications. Valid and well formed Markup also bespeaks careful craftsmanship and that appeals to many web authors.

James


--------------------
Interoperable Web Pages - Always with validated HTML/XHTML/XHTML+RDFa, CSS, RDF, XML, RSS
Elegant Italic Handwriting - Roman Coins of the London Mint - WW2 Air Raids, V1s & Aircraft crashes
Go to the top of the page
 
+Quote Post
jackfranklin
post Feb 16 2008, 06:33 PM
Post #14


Rapid Squeezer
****

Group: Members
Posts: 102
Joined: 16-February 08
Member No.: 163



You wouldn't send a letter filled with spelling errors to a friend, would you? It's the same time of thing smile.gif


--------------------
Jack Franklin | Eportfolio & Weblog
Go to the top of the page
 
+Quote Post
matthew
post Feb 17 2008, 08:17 AM
Post #15


New Squeeze
*

Group: Members
Posts: 3
Joined: 15-February 08
From: Edinburgh, Scotland
Member No.: 151



IMHO

Writing valid code does not take any extra effort. If you are coding CSS and XHTML properly it is difficult not to write valid code unless you are trying to make a complex table based layout work in both IE and Firefox or using Microsoft Visual Studio to write an ASP.NET page (the latter being near impossible).

Websites should adhere to the standards where possible and I would never dream of making a professional website that does not follow these standards, However...

One thing that does wind me up with standards which is the only situation I would ever break them is for IE6's lack of support for PNG images. PNG is the most handy image file format ever but you can only use them in cross browser websites by implementing the behavior:url(png.htc); hack or the filter:... hack (unless some one knows something I don't).

The behavior: trick is bad practice and is incredibly messy and the filter: trick just isn't valid css. Other than this I don't think websites are limited by valid or invalid code. I am currently making a completely web based RPG engine with editor and every thing (Kinda like RPG Maker but entirely in XHTML, JavaScript and PHP but with a social networking ability so users can share games easily and see what each other are working on). This includes a drag n drop interface and other fancy effects to make it feel like a windows based app almost and so far it works perfectly in both IE and Firefox and the code is completely valid in every sense of the word. I will eventually, when I start adding translucency to Actors and Animated effects I am going to have to employ the filter: trick but I am sure that that will be the only bit of invalid code in it.
Go to the top of the page
 
+Quote Post
Antti
post Feb 18 2008, 02:35 AM
Post #16


Rapid Squeezer
****

Group: Advisors
Posts: 275
Joined: 15-February 08
From: Finland
Member No.: 139



QUOTE (Jasontor @ Feb 16 2008, 06:21 AM) *
It works in IE & FF, it functions correctly without any errors and the client likes it. That's how I validate my websites...

-Jasontor


I couldn't agree more. I look at this the same way although I try to write valid code but if for ie visual studio turns it non-valid I don't mind as long as it works.


QUOTE (jackfranklin @ Feb 17 2008, 01:33 AM) *
You wouldn't send a letter filled with spelling errors to a friend, would you? It's the same time of thing smile.gif


I don't see how it would be the same thing. 95% of clients I've had didn't even know what a source code was. They couldn't care less if it's valid or not. As long as it functions correctly and looks ok, they are happy.


--------------------
anttisimonen.com - .NET developer

anttis.wordpress.com - Blog
Go to the top of the page
 
+Quote Post
Jason
post Feb 18 2008, 03:44 AM
Post #17


Master of the Universe
******

Group: Advisors
Posts: 1,157
Joined: 15-February 08
From: London, England
Member No.: 141



QUOTE (Telos @ Feb 18 2008, 07:35 AM) *
I don't see how it would be the same thing. 95% of clients I've had didn't even know what a source code was. They couldn't care less if it's valid or not. As long as it functions correctly and looks ok, they are happy.


Writing valid code doesn't take any more time than writing invalid code. There is no reason not to write valid code. A site that is invalid indicates a lack of knowledge or laziness on the part of the developer.

Many job descriptions now have 'knowledge of W3 standards' as part of the job description indicating that it is growing in importance with clients.

This post has been edited by JasonStanley: Feb 18 2008, 03:44 AM


--------------------
Go to the top of the page
 
+Quote Post
Antti
post Feb 18 2008, 04:33 AM
Post #18


Rapid Squeezer
****

Group: Advisors
Posts: 275
Joined: 15-February 08
From: Finland
Member No.: 139



You are right, there's no reason not to write valid code but sometimes you'll end up having one anyways for example with third party code, or you have just forgotten something ie. to use the alt attribute with images. Of course that's your mistake but usually I don't take the extra day to include one to those hundreds of images (in worst case scenario). Especially if the client is already happy with the site. You can't really justify the extra cost to the client either.

Maybe it's just Finland but I haven't seen a single job description here yet which would have mentioned W3 standards.


--------------------
anttisimonen.com - .NET developer

anttis.wordpress.com - Blog
Go to the top of the page