4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Read before Posting in this Forum: W3C Validation
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Sat Jan 03, 2004 12:04 am (13 years, 11 months ago) Reply with QuoteBack to Top

When writing HTML many people often overlook one of the most important things (at least from a techinal point of view). It's just as important that your code conforms to the standards (as defined by the World Wide Web Consortium) as it is that the site looks good.

"Why should I bother?" you might ask. I had a conversation with my brother (a designer) about this exact thing once. He made the argument that as long as it looks right on his target platform, it doesn't matter that the code is right - if it works, it's good enough. The only problem with this argument is that it's not good enough, and it won't always work. The idea behind conforming to standards is predictability of code. When writing a HTML interpreter, the programmer doing the work needs to be able to predict what code his software will encounter - in order to avoid unpredictable results. Using strict standards is the only way to achieve this.

I'm sure many of us remember how bad old versions of netscape were - but the truth is that the problem wasn't that netscape was coded badly, the real problem was the lack of standards. At the time, Microsoft were desperately trying to crush their only rival in the web browser world. Netscape and Microsoft were in all out war, and so tried to make their browsers incompatable. This of course meant that only one browser could win, and that browser was IE. The result? Most web sites were written to conform to the way Microsoft thought, and Netscape became mostly useless.

To stop things like this happening again, the W3C created and maintains a set of standards. By conforming to these standards, you ensure that your code will work in any browser which also follows them. These days, most browsers do - in my opinion, Mozilla is the best at doing so; IE is the worst of the big names, but does not fail in any crucial areas.

So, it is definately worth your while learning how to code to a standard version of HTML - or better yet, XHTML. Doing so with only a list of rights and wrongs would be nearly impossible, so luckily the W3C provides some online tools to get the job done. Their HTML Validator and CSS Validator can be used at no cost to check any freely accessable page online, and can also be used to check code straight from your computer if you haven't uploaded it yet.

In order to show how this works, I'll show you two examples of sites which try to conform to the standards: our beloved 4WebHelp is the first, and my site (moosoft.net) is the other.

The validator results for this site show that the XHTML markup is nearly perfect (at least for the home page).

The results for moosoft.net show that the code on the homepage (to my surprise) does not conform to the standard. There are a few errors (which are infact due to the code automation of my chosen blog script), and the validator quickly and easily pointed them out to me - you can easily see that I have <p> tags nested inside each other, which is not correct code. It will now be easy for me to correct this error - though I will refrain from doing so for a while, so this example will be available.

The CSS validation results for moosoft.net and 4WebHelp both show that the CSS is completely valid.

Hopefully you can all see what a powerful tool the W3C validators are, and also how valid code is important. Anyway, that's enough of a lecture for now Smile happy coding

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Sat Jan 03, 2004 9:56 am (13 years, 11 months ago) Reply with QuoteBack to Top

Great post Adam! Very Happy

Now to stickify it Wink

Also may I point out that if you don't hand code, there are several options in the most recent versions of Dreamweaver to output (at least) more valid code. Just ask if you can't find them in the jumble of options Dreamweaver has Smile.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Sat Jan 03, 2004 12:36 pm (13 years, 11 months ago) Reply with QuoteBack to Top

heh...typical, I forgot to sticky it Rolling Eyes

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
phryxus
Junior WebHelper
Junior WebHelper


Joined: 16 Nov 2003
Posts: 46

PostPosted: Sat Jan 03, 2004 2:22 pm (13 years, 11 months ago) Reply with QuoteBack to Top

It should be nice if you make a tutorial for this. Idea
OfflineView User's ProfileFind all posts by phryxusSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Sat Jan 03, 2004 2:25 pm (13 years, 11 months ago) Reply with QuoteBack to Top

I'm not sure if there's substance here for a tutorial. What other things would you want in it?

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
phryxus
Junior WebHelper
Junior WebHelper


Joined: 16 Nov 2003
Posts: 46

PostPosted: Sat Jan 03, 2004 6:44 pm (13 years, 11 months ago) Reply with QuoteBack to Top

Giving information about what you should to do to get better working websites (scripts). You can use validators as one of the steps.
OfflineView User's ProfileFind all posts by phryxusSend Personal Message
fifalove
Junior WebHelper
Junior WebHelper


Joined: 09 May 2015
Posts: 2

PostPosted: Sat May 09, 2015 1:09 am (2 years, 7 months ago) Reply with QuoteBack to Top

so great

________________________________
fifachampion | runescape 07 gold
OfflineView User's ProfileFind all posts by fifaloveSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.049306 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme