PDA

View Full Version : Validation


l337dexter
04-25-2005, 11:38 PM
I am working on making sure my site is XHTML Transitional Validated. Its a pain in the butt, especially wiht flash tags, but what are the benefits of having it validated besides just being bored?

-slenk

Velox Letum
04-26-2005, 12:00 AM
This would more be a question for the HTML section, but having your site validated ensures maximum viewability in different browsers.

Fou-Lu
04-26-2005, 04:51 AM
This would more be a question for the HTML section, but having your site validated ensures maximum viewability in different browsers.
Thats true, and at the same time... not ;)
Should be more like, validation ensures maximum viewability in different, compatable, non internet explorer browsers :)
Lol
IE isn't really that bad, but don't test using it, use something like Firefox instead. The html is pretty much rendered all the same, its more the CSS that you will be fighting with - which IE is not compliant in.

Velox Letum
04-26-2005, 05:03 AM
IE is horrible when it comes to CSS, though we can expect IE7 to be slightly better due to the fact its based on a Mozilla core...

Bill Posters
04-26-2005, 08:33 AM
Fwiw…

In the event that you start serving your xhtml markup using the 'ideal' application/xhtml+xml mime-type (rather than the default text/html), then validation will help to ensure a document's 'well-formedness' (i.e. tags correctly nested and closed, etc…).
When served as application/xhtml+xml, an xhtml markup document that isn't well-formed will return a (yellow) xml parsing error page, rather than attempting to render the page.

It's not so much of an issue now, with browser support for application/xhtml+xml still being hampered by MSIE, but having a valid page isn't going to do your site any harm, whereas an invalid page can - and probably will at some point.
Working towards valid markup/… also (imho) helps to improve your understanding and proficiency in web development as well as helping you to be better prepared for progressive changes happening in web development.

l337dexter
04-26-2005, 12:24 PM
Thanks.

Well last night I made sure my site was XHTML Transitional and CSS validated at http://validator.w3.org I was gonna go for strict but it doesn't like the command <div align="center"> It says center is not a valid name. Thanks guys...i figured mostly what it meant, but yeah, now I know for sure.

It sure is funny though with like Dreamweaver when you drag in flash, that is DEFINITLY not xhtml compliant. You would think some nice program like that would try to be compliant. Oh wells.

Fou-Lu
04-26-2005, 03:24 PM
lol
BTW its the align within your div tag thats killing your strict. To do that you need to take the parent of that div and give it a margin: 0 auto; and text-align: center and work from there. Text-align isn't required for compliancy, but good o'l IE 5 will stumble without it ;)

l337dexter
04-27-2005, 07:16 PM
agh....thanks

Velox Letum
04-27-2005, 07:19 PM
Strict doesn't like html based styling. Turn bgcolor="#FFFFFF" into style="background-color: #FFFFFF;" or put it into a stylesheet and include a class tag.

Fou-Lu
04-28-2005, 05:04 AM
Yep yep,
IMO Strict compliancy you only really need to look at if you are going to do a full css based design. Otherwise, use transitional, that way you can still use the beloved table and other common ways to control your html.
The side effect of using strict with css based design is that you will end up with exponentially reduced files sizes, which will save you on download times and bandwidth.

l337dexter
04-28-2005, 07:26 PM
I will just stick with transitional...easier for me

Velox Letum
04-28-2005, 07:51 PM
Just use CSS instead of HTML styling. Not hard.

instead of align='center'
style='text-align:center'

l337dexter
04-28-2005, 10:16 PM
I shall try that

Where do I find the differnet codes you have to put at the top for transitional and strict...i have found transitional but i am having trouble finding sctrict

Velox Letum
04-28-2005, 10:20 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

A list:
http://www.w3.org/QA/2002/04/valid-dtd-list.html