Go to the menu - Go to the contents

[Site map] You are here --- > Newbies Paradise > Tutorials > Official > Website > Reading a tutorial

W3C standards

Avatar
Author : M@teo21
Creation : : on 01/23/2007 11:13:24 AM
Last modification: : on 07/22/2008 03:35:07 PM
Rate and comment this tutorial
Print this tutorial
This is an appendix with a very pompous name and yet, this is a crucial one.
I prefer warning you now: you won't learn how to create wonderful flashing effects but you'll get to know a bit of the history of the web.

Why do we code in xHTML nowadays and not in HTML any more? Why did one decided to split content (xHTML) and layout (CSS)?
Why are some websites validated while others are not?

And your website... is it valid?
Chapter Contents :
Previous Chapter Contents Next Chapter

World Wide Web history

We are going to start with the basics: the Web's history. Every webmaster should know how old the Web is and a bit of its story.
It's not only a question of culture, it will also help you to understand this appendix. Read carefully, and you won't seem so stupid when you chat with other webmasters :p


As you can see, in this story a lot of people took care of the good development of the Web, and fought to ensure it didn't become dependant of a large international company.
Nowadays (and more than ever), the W3C must protect the Web's future. We will now have a look at what the W3C did precisely on the HTML language and why, today, we talk about standards with xHTML and CSS.

From HTML to xHTML

As I told you in my little story, Tim Berners-Lee created the first version of HTML at the beginning of the web.
In fact, as for any other software, HTML has evolved throughout many versions:

It is now the future of the web, and it will allow us to create websites viewable on all kinds of PDA, multimedia cell phones and other portable devices that will for sure become more numerous in future.

Can you imagine if there were 35 different formats for audio CD's? Your CD drive could probably read some, but not all... what a mess it would be. Well, it's the same for XHTML: people gathered and agreed on how a web page should work. At the end, everyone is getting out of this winning: you (the webmaster) and them (the visitors).
Creating a standard allows to make sure everyone speaks and understands the same language. It's always by creating standards (and not only in computing) that we manage to make things evolve together :)

What about CSS?



The CSS's story begins in 1996. We got back to the idea given by the man I told you about in the beginning of this appendices (William Tunnicliffe): we must separate the content from the layout. Doing this brings numerous advantages: the website design will be easier to update, pages will be faster to load, it will be easy to suggest many designs, etc.

CSS 2 dates from 1999, and yet some browsers (Internet Explorer, not to name it) still hasn't implanted it properly. It has to be said that fully managing CSS isn't a simple thing, there are always at least bugs. The matter is that we, website developer, are the one who pay for that, because we always must be careful about the differences between browsers.

Overall, remember that creating a web page in XHTML and CSS is simple (let's say from 7 to 77 years-old :p). The only annoying this, even when you are experienced, is to get to create web pages which works well on every recent browsers (Firefox, Opera, Konqueror, Safari...) AND on Internet Explorer, which is a specific case.

Is your website valid?

For the last part of that chapter, we'll stop chatting and get back to technical stuff.
The goal of what I've been telling you since the beginning of the chapter was first to teach you about the Web's history, but it was also to sensitize you about that matter of validity...
What's that all about?
Are there websites that are valid and others that aren't?

Remember: W3C has set norms. They have to be respected, in order to make sure that all websites "speak the same language".

The W3C website (www.w3.org) features a tool that is called "Validator" (frightening, right? :p )
The validator is some sort of a program that will analyze your source code and tell you whether it is written properly or if it contains mistakes.

There are two different validators:

We'll learn how to use both, by beginning with the xHTML one.
Be aware that the xHTML validator will probably notice several mistakes on your web page. So don't worry, it's your first time anyway ;)
However, the CSS validator will cause less trouble. Mistakes are rarer in CSS than in xHTML.

The xHTML Validator



Let's start with the big part of it, okay :p

First, put that page in your bookmarks, it's the adress of the validator: http://validator.w3.org/.
Those who have downloaded the "Web Developer" plugin for Firefox can also directly check their page through a specific menu.

The page you're looking at is quite simple. It features two ways of validating:


The result will be the same, whether you choose the first way or the second.

If everything goes fine (you're definitely lucky :D ), you shall see the following message:

User image


User image
The site will propose you to put that sticky on your website to show that your pages respect the norms, and that you thus respect the established rules.
That is no obligation at all, if you find that too ugly, just don't put it ;)

Of course, if your website contains more than one page (which is very very frequent ^^), all of them will have to be tested.
HEEEEEEEEELP!!! :waw:
My web page isn't valid, I'm surrounded by errors, I won't cope, please help meeeeeeee! :waw:

This is the usual reaction of the beginner who realizes that his page which he thought perfect actually wasn't

First, remember that: It is not because your web page is displayed properly that it doesn't contain any error.
Your web page can be quite nice and though contain a bunch of errors.
Then what's the point in correcting them?

I kept reminding you: if you claim that your web page speaks "xHTML 1.0", it has to speak it correctly for everyone to understand it. You must know that browsers "try" not to display errors when they occur so the internaute doesn't get disturbed, but some browsers may not display the page properly!

Having a valid web page thus means that you can sleep peacefuly for you know that you respect the rules.
Moreover, and it has been confirmed, a well-built web page is to have a better place in the Google search results, which will bring you...more visitors!

I won't list every possible errors, it would be way too long to quote. However, I'll give you a list of the most frequent ones. You will probably recognize some of the ones you may have done and you'll be able to correct them.

The CSS Validator



Now chill out, it'll be way faster ;)

First of all, here's the URL of the CSS validator to add to your bookmarks:
http://jigsaw.w3.org/css-validator/

You must precise the adress of the CSS file you want to validate. As for xHTML pages, you can also send your CSS file directly from your hard drive.
Also note that, as for xHTML files, if you have several CSS files to validate, you must submit all of them.
You don't have to set the file's adress directly. You can just type the adress of your xHTML page (.html) and the validator will come get all the CSS files you use (thanks to the <link/> tag!)

You have to know that it is necessary to first use the xHTML validator, correct your mistakes and then pass on to the CSS files.
The CSS validator will probably not load at all if there are still xHTML errors.

So, usually CSS validation is really piece of cake (you can't say the same about the xHTML one, right :p).
To find errors, you must have really fully mistaken somewhere or you must have used unofficial CSS properties. Here are the few rare mistakes you may have made:


User image
You've succeded in making valid CSS files? Congrats! (It wasn't that hard :p)
You can put the opposite "CSS Valid" logo to show that your style sheets do respect the norms. Once again, you're fully allowed to use your own if you find that one ugly, or even put nothing if it does not fit the design of your website.

I hope you liked this appendix and you learnt interesting things.

... ok, this conclusion is a little bit classical :lol:
More seriously, don't neglect this appendix: I tried to sum up everything about the Web, its goals, its development, its history. A history that YOU will write, in part, as a Webmaster.
It's important that your websites are xHTML and CSS valid, that you respect these rules in order to help making the Web evolve.

And over the respect of rules, it's also the respect of your visitor that you must think about. Putting a little ad to pay your website, why not? But inserting thousands of popups and javascripts, please don't.
Aren't you sometimes irritated by some invadings websites? Guess what a visitor could think, and then create a website that he will appreciate.

If you follow my advice, you won't have to bother about your website anymore: it will be successful :)

It's just a matter of time and will! ;)
Previous Chapter Contents Next Chapter
Author : M@teo21
Rate and comment this tutorial
Print this tutorial

Change your template | Learn more about NP | Site map | Terms of use | Rules | RSS feed | XHTML 1.0 | CSS 2.0
Powered by Simple IT SARL: Contact us

There is nothing else to read, you have to go up now !

Do you want to be published here? Contact us.

Number of Newbies connected 8 Newbies Connected | SQL requests 9 Requests | Page loading delay 0.0304s (0.0204s)