PDA

View Full Version : My Html Validation Problem


michael_9992
12-10-2006, 09:01 AM
Hey guys. I use this html validation website. Go here (http://www.firestyledesign.net) and down the bottom is the box (click on the left one). And it has that error. What pages type would I have to use instead of xhtml 1.0 strict or do i need to learn the code. Well I dont know what Im talking about, i need help! I tried putting in this code cause I wanted a counter (before then everything was fine):

<!-- Begin Shinystat Free code -->
<script type="text/javascript" language="JavaScript" SRC="http://codice.shinystat.com/cgi-bin/getcod.cgi?USER=firestyledesign"></script>
<noscript>
<A HREF="http://www.shinystat.com" target="_top">
<IMG SRC="http://www.shinystat.com/cgi-bin/shinystat.cgi?USER=firestyledesign" ALT="Blog counter" BORDER="0"></A>
</noscript>
<!-- Begin Shinystat Free code -->

ramandeep
12-10-2006, 11:12 AM
Ok, now there are 2 options
1) If you want this particular Stat counter and want page to be valid than use transitional doctype

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


2) This page can be made valid as per current doctype, if you use some other stat program which gives valid version of code aswell.

Just for your knowledge

Elements that are not allowed in Strict DOCTYPEs

* center
* font
* iframe
* strike
* u

Attributes not allowed in Strict DOCTYPEs

* align (allowed on elements related to tables: col, colgroup, tbody, td,
tfoot, th, thead, and tr)
* language
* background
* bgcolor
* border (allowed on table)
* height (allowed on img and object)
* hspace
* name (allowed in HTML 4.01 Strict, not allowed on form and img in
XHTML 1.0 Strict)
* noshade
* nowrap
* target
* text, link, vlink, and alink
* vspace
* width (allowed on img, object, table, col, and colgroup)

domedia
12-10-2006, 07:13 PM
Also XHTML has a different way of dealing with tags that has not end tags, like <img>. The code you have above for the <img> is html 4 and earlier, while your doctype declares xhtml.

Normally, if you're not a coder, you can sometimes ignore the validation warnings, but should fix validation errors.

If you want to make webpages, it's always a huge benefit knowing what the code you are making actually means.

michael_9992
12-11-2006, 05:06 AM
ok, but ramandeep, I dont get your second answer. And whats the differnece between strict, traditional etc.

michael_9992
12-11-2006, 05:24 AM
also, I changed it and uploaded it, and it says it is valid shtml strict, even though I changed it to traditional, is that normal?

michael_9992
12-11-2006, 06:13 AM
even though i changed it to tradition, it still gives me 9 errors.

ramandeep
12-11-2006, 01:36 PM
Nope if your it is transitional it will show the same and not strict , i checked your page it shows transitional anyways.

As far as i can see from a quick look all your errors are from your counter, why don't you use a this free counter
http://www.statcounter.com/free_hit_counter.html

I think there is a valid code option there aswell. Check it out !

domedia
12-11-2006, 01:50 PM
Or simply don't use a counter at all, they're really cheezy if you ask me ;)

Your host should have some kind of website stats for you anyways..

michael_9992
12-12-2006, 09:51 AM
Ill look tos ee if the host has one, otherwise ill go with yours. I just want to see page visits etc.

domedia
12-12-2006, 02:19 PM
If you're paying for hosting, your host has no excuse not to provide this to you, imho.

michael_9992
12-13-2006, 05:19 AM
I emailed them but with my host, they dont even use their site, only for support. You do everything using cpanel, and it doesnt look like they have one. they are a really good host and really cheap. (suppose thats the reason why!)

domedia
12-13-2006, 12:53 PM
Seriously, if you don't have any kind of server log analysis tool (awstats or similar) in your CP, you should switch. They're not saving money by not having it.

michael_9992
12-14-2006, 09:22 AM
Yeh I checked and they do, so its all good.

ramandeep
12-14-2006, 01:32 PM
Now as your HTML is ok now , lets move to your CSS.

its ok aswell :-) just few warnings.

michael_9992
12-15-2006, 06:02 AM
So how do I fix some of the warnings? or just leave them?

michael_9992
12-15-2006, 06:02 AM
Also, is there a document type that is better to use than the one I am using, like instead of xhtml can I use html or something?

ramandeep
12-15-2006, 11:32 AM
Ok
Errors should be fixed and warnings can be left but they can be fixed aswell.

Regarding doctype, the doctype you are using is ok but what you need to see
is differences between them and what is suitable for you.