W3C validator

C

Cimbian

I am working on a simple site for my local archery club and using FP2003,
though more and more of what I have been doing is in the code itself.

Ideally the code should validate as XHTML but when I run it through the
validator I get errors on some of the attributes in the <HTML> definition.

My definition is:
<html lang="en" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice"
xmlns="http://www.w3.org/TR/REC-html40">

My test page URL is:
http://www.cimbian.co.uk/BognorArchers/z_testpage.htm

Any thoughts, please?
 
K

Kevin Spencer

Ideally the code should validate as XHTML but when I run it through the
validator I get errors on some of the attributes in the <HTML> definition.

The first thing I would ask you is why "Ideally the code should validate as
XHTML." For what purpose? What is the requirement? Ideals are only ideal if
they serve a purpose. Otherwise they are imaginary.

Assuming that there is some real purpose for wanting the web page to
validate as XHTML, you're going to have to get yourself a good education in
XHTML, because FrontPage isn't limited in that way. It can create just about
any kind of HTML you want, and if you don't know what you're doing, you're
going to spend hours and hours trying to figure out why the page doesn't
validate.

I ran your page through the W3C validator as well. There are 14 different
validation errors in the page. Most of them are fairly self-explanatory. If
you're wondering how they got there, see my second paragraph.

Here are a few corrections for you, but mind you, again, if you plan to
continue with this, you'll have to study it for yourself:

You can get rid of the first 3 errors by changing your root tag to:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" Lang="en">

You can get rid of the rest of them by removing the <embed... /> tag from
the page. for more details about Flash and XHTML, see the following article:

http://www.alistapart.com/articles/flashsatay/

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
 
C

Cimbian

Kevin,

I am writing this site for a few reasons, one of which is because I am a
club member and trying to do my bit for the club, the other is that I want to
re-write my own website using CSS (it is currently HTML with the presentation
and content all combined and a pain in the neck to maintain).

I agree that I need the knowledge to understand what I am doing and have
bought two books (stylin with CSS and Web Standards Solutions) and have
learnt a lot from them. Both books stress the need to have valid code to
increase the chance of working across browsers, which for my own site is
important as I use it for my small electronics business.

The books give examples of DOCTYPE etc. but neither tell me where to go if
the references to elements and attributes cannot be found, and I had the same
experience when browsing for answers, hence the questions. I really did try
to work it out myself first but ran out of steam.

The objectives of using XHTML for me are, as I have said, cross browser use
and ease of maintenance. If I grow my business and can pass the site onto
someone to manage then it will be easier and cheaper if it is
standards-compliant to begin with, the same goes for the club site.

The issue of Flash and compliance is obviously difficult but that article
you pointed me at has made things very much better in this respect ('better'
being subjective of course).

The initial errors were self explanatory, as you say, but only if you know
where to point to find the file to fix the problem. I knew they were wrong
but not where to find the answer without asking.

I do very much appreciate your help in getting this fixed but I don't want
you to think that I am just looking for a quick fix. If I understand the
problem I can work differently to avoid it in the future.

Thank you for your help.

Steve.
 
K

Kevin Spencer

Hi Steve,

Don't get me wrong. I didn't think you were looking for a quick fix. But
developing valid XHTML is a major undertaking (as you've discovered), and in
many cases it just isn't worth the trouble to do it. In addition, people do
it for the wrong reasons.

I've recommended XHTML on many occasions, and feel that it is well worth
learning. In addition, I expect the HTML software to catch up with it and be
able to work with it more effectively. But for someone like yourself, you're
looking at a huge learning curve presently, particularly with regards to
existing HTML dev software.

The issue of being cross-browser compatible is one which can be surmouted
fairly easily, without having to learn all the rules of XHTML, which is very
strict (which is also a good thing overall). Not that I don't recommend
learning it, but don't kill yourself right away! One tip for cross-browser
compatibility: Get a copy of FireFox. If you test in both FireFox and
Internet Explorer, you've covered at least 90% of all browsers. In addition,
use CSS as much as you can for styling. CSS isn't always the same in all
browsers, but using external style sheets you can make changes easily that
will affect all the pages using the CSS. Also, most of the inline attributes
are going away. The differences in CSS support across browsers are fairly
insignificant.

And of course, come on back next time you run into a problem you can't
solve!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
 
C

Cimbian

Kevin,

I know what you man about being a mountain to climb but I hope I am past the
foothills ;-)

Presently I have the site open locally in IE, FF and Netscape. I am trying
to avoid writing for IE alone so am checking all changes in each.

So much for standards, eh?

Steve.
 
K

Kevin Spencer

So much for standards, eh?

Well, the good news is, all the vendors are now designing to standards. The
next version of IE is slated to be nearly 100% standards-compliant. Netscape
is now going with the Mozilla architecture (as exemplified in FireFox),
which is (almost) fully standards-compliant. And XHTML is very strict, which
means that the nightmarish accumulation of rules and exceptions to rules in
HTML is going away. As an added bonus, XHTML being XML, is easily
transformed to any document format. Microsoft Office is going to an XML
format. So, things should get much simpler as time passes!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top