Jump to content

W3c Validator


grindy
 Share

Recommended Posts

I validated both my css and web page on w3c schools validator. They both passed with no errors. The page works perfectly in explorer but it looks like crap in fire fox. I thought if your pages and css passed in the validator it would be compatible across platforms. Could someone maybe explain to me why this isn't always so.

Link to comment
Share on other sites

1. The validator belongs to the W3C (the folks who set the standards) not the W3Schools, which is an unrelated, for-profit organization.2. Code can be valid without looking nice or rendering consistently. Writing standards-compliant code is a step towards consistency, but no guarantee, especially since the simplest difference in markup or CSS can have enormous visual consequences. This is not a weakness of validation. You simply need to change your understanding of its purpose.3. Are you by any chance using a transitional doctype (or no doctype)? If so, give up all hope of consistency except for the most childish of pages. Nothing sophicticated will ever render consistently unless you use a strict doctype. The biggest issue is the IE box-model. There's a short explanation here if you need one.4. You might post a link to your page (or your documents themselves) and someone might spot the flaw. Most of the things that cause rendering inconsistencies are pretty well-known.

Edited by Deirdre's Dad
Link to comment
Share on other sites

I am just learning web page design and have only been at it for a couple weeks. I am taking a course on it. But I am using transitional doc type which I still don't fully understand yet. My page is very simple as i don't yet know enough about web page design yet. This is my first assignment on the course and i cant use any fancy stuff yet like colors and images, I am only allowed to use one image. This is the link to my page. Keep in mind that I have only been doing this for about a week or so.here is the link to the pageshttp://nexus.mohawkc.on.ca/shernden/sh10/madmax/index.htmland here is the link to my csshttp://nexus.mohawkc.on.ca/shernden/sh10/madmax/style.cssI have already handed in this assignment for grading so I guess it doesn't matter if I post it in here.I am going to try it with the strict instead of the transitional to see if I can fix it. This page displays good in ie, but not firefox.Any advice would be greatly appreciated.

Edited by grindy
Link to comment
Share on other sites

definitely go with a strict doctype and see what results you have. Also, in the future, explain the inconsistencies you are experiencing as well as what you are trying to achieve.

Link to comment
Share on other sites

Wow. Is your instructor actually teaching you to use tables and <br> elements in this way? Or the blockquote? I don't mean to sound insulting, but this whole page needs rethinking, not simply the doctype.

Edited by Deirdre's Dad
Link to comment
Share on other sites

so you mean the <blockquote> is no good the <br /> tag is no good and tables are no goodwhat should i use to replace these then.and if they are no longer used, shouldn't the validator say that there are errors or something like thatmaybe i have the wrong idea about what this validator is all abouthow is my css code theneven microsofts home page uses tables according to this article. but the author also says their page isnt professional eitherhttp://stopdesign.com/archive/2004/07/27/t...ing-tables.htmleven the big boys seem to be doing it wrong, go figure.

Edited by grindy
Link to comment
Share on other sites

There are several ways to define wrong in this context. Almost all of the elements in the HTML 4.01 specification have legitimate purposes. The few that don't are being removed or changed for HTML 5. As long as you format them correctly, the validator will say you're correct, and that's that.What we are talking about is more like this: use a car for passengers and a truck for hauling. Either one actually works for both, and both ways are legal, but one is clearly designed for one task, and the other for a different task.Best practice says to think of HTML like that too.So a table is for tabular data, like a calendar or a spreadsheet. It should not be used as a shortcut to design.Blockquote should literally be reserved for quoted material. Not as a shortcut to a certain level of indentation.An <h1-6> should be reserved for actual headings. Not as a shortcut to a different size and font-weight.The principle we're talking about is semantic design: an element should DO what its label says it does. CSS exists for presentation (layout and such), and it can do more than most people imagine. Certainly more than a very rectangular table layout can do. In fact, most of what an HTML designer needs to know is CSS. You could go your whole life and not use half the available HTML tags. But a good designer spends the whole day thinking about padding, margins, and floats. If those words aren't coming up REAL SOON and REAL OFTEN in your HTML class, something is not right. If someone's telling you to position things with <br> elements and   characters, something is seriously not right.You can layout your family history page anyway you want, and no one's going to care. But if the web lies anywhere in your career future, it's best to do it right.

Link to comment
Share on other sites

THanks, I am starting to see what you are getting at here. I looked at this page which is full of tables that seem to be used for display purposes only. http://www.sitepoint.com/examples/cssvtables/tables4.htmlthen I am looking at the same page without using tables for display. they are using the css.http://www.sitepoint.com/examples/cssvtabl...terflycss.html#wow what a difference, much cleaner. I like this latter approach much better. I am going to remake my page again even though i wont get any marks for it since i already turned in the assignment. It will be for my purposes only.thanks for the advice Deirdre's Dad

Link to comment
Share on other sites

Also, using tables for layout goes against the WCAG[1] - so technically, it is illegal to lay out web pages with tables in some countries[2] :)

Link to comment
Share on other sites

I validated both my css and web page on w3c schools validator. They both passed with no errors. The page works perfectly in explorer but it looks like crap in fire fox. I thought if your pages and css passed in the validator it would be compatible across platforms. Could someone maybe explain to me why this isn't always so.
A certain explanation of that, which I personally like, is that validation guarantees that the code will be parsed the same way. It does not guarantee that it will be rendered the same way. "Parsing" in this case is the process where the browser tries to figure out what you want to do. "Rendering" in this case is the process where the browser does what you want it to do. The browser may understand what you want, but be unable to do it, or do it, but not properly.Consider this. I could tell you to "jump" (for the sake of example, let us assume you'd actually do whatever I tell you... :)). You know that "jump" is an action, but if you didn't know what a "jump" is, you'll be unable to do it. Similarly, you may jump, but not in the way I meant to tell you to jump (e.g. you could jump up, when I meant jump forward). In contrast, if I tell you "jumped", you'll have no idea that I mean to tell you to jump. In fact, you'll have no idea what to do, or if you should do anything at all.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...