To what point is making an HTML page valid worth it?
Asked Answered
J

4

7

Since a long time ago, when I found out about the W3C Validator, I made sure every HTML document I made was valid HTML.

However, I think sometimes it just isn't necessary to waste time making it valid. Of course, for actual Internet pages may be important, but is making pages on an Intranet, or even little front-ends that are used with other programs, when the HTML page renders correctly in the most used browsers (not necessarily counting IE 6 and 7).

I think I'm mostly talking about little improvements over code, such as wrapping every shown element of the page on <p> or <div> tags.

Josefajosefina answered 16/6, 2010 at 3:55 Comment(1)
I think you could also add that for smaller amounts of html it won't hurt your pages. If you can't get the desired layout after making it compliant you probably have css issues.Rizo
D
6

Making a page validate for its own sake is not really a business proposition. What happens for end-users (with their cranky browsers) is the real test.

That said, validating periodically will help you debug. It'll catch the more salient errors like unclosed tags. Which, in turn, does affect end-users. So treat validation like compiler warnings -- good for discipline.

Dorey answered 16/6, 2010 at 4:0 Comment(1)
+1; it shouldn't be a business proposition. But strangely, in my experience, it can impress non-developers when you say your code is all ‘validated’. At my company, business stakeholders (who have no idea what validation is) always seem impressed by seeing "All pages will be W3C validated" as a clause in a proposal from an agency. No matter how many times I tell them it's a technical thing that makes no difference to them.Herculaneum
L
1

It's the best practice, but it really comes down to an organizational requirement/desire. Is it important enough that standards add value for your organization? Or is it simply enough that it displays correctly? Often with intranets its the latter.

Lye answered 16/6, 2010 at 3:56 Comment(0)
E
0

Making an HTML page "valid" is worth it if you intend to be future friendly. That is, when browsers begin to strip out deprecated or vendor specific tags, you will find your page displaying incorrectly.

Web standards are there for a reason - to ensure consistent display/output among web browsers and interpreters. Choosing to write your pages in non-compliant HTML is your decision. It is also, to take an old adage, your "funeral".

Evangelia answered 16/6, 2010 at 3:59 Comment(0)
R
0

What happens when the browser of choice for the intranet changes? There really isn't a way to guarantee that the code you have will render correctly in EVERY browser. But in a lot of cases the browsers will be reasonably close to the standard. I think it also depends on how complex the page is because the chances it renders differently in different browsers increases as the complexity of the CSS and tag depth does. The best way is to write valid cross-browser code and test for target browsers. Its silly to think write-once and render the same everywhere is possible for all browsers. But adhering to the standards is the best way you can get close.

Rizo answered 16/6, 2010 at 4:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.