 |

01-31-2005, 06:08 PM
|
|
WebProWorld Member
|
|
Join Date: Apr 2004
Location: Netherlands
Posts: 80
|
|
HTML validation help
I don't know if this is the correct forum for this question, but I didn't know where else to put it.
I've been working on my html validation, because I never really paid attention to it, until I started to use Firefox and Safari, and I really want to have a validated html code.
Well, I went from over 70-80(!) errors to 2. I'm kinda happy with that, but 2 is still too much. I've tried everything to correct these 2 errors, but nothing works, so I'm hoping someone here can help me.
Here's the link with the errors and my url:
Validation Page
|

01-31-2005, 07:46 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
First error is easiest to fix...
you have two body tags! :o)
Quote:
|
Originally Posted by W3C Validator
21: <body>
22: <body bgcolor="#F9E5F1">
|
|

01-31-2005, 07:48 PM
|
|
WebProWorld Pro
|
|
Join Date: Nov 2004
Posts: 144
|
|
You have two body tags, you need to remove one of them.
Code:
<body>
<body bgcolor="#F9E5F1">
|

01-31-2005, 07:48 PM
|
|
WebProWorld Pro
|
|
Join Date: Nov 2004
Posts: 144
|
|
haha sorry paul, was posted the same time as you.
|

01-31-2005, 07:50 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
LOL!! Think we collided mid-air! I felt some sort of collision anyway! :o)
|

01-31-2005, 07:55 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
Error number two...
Line 26: Try this.....
<td colspan="2" bgcolor="#F5AFD5" height="90" width="750">[img]Websitepics/bannner.png[/img]</td></tr>
An alternate solution might be to use CSS to load the background image, and might save you a few bytes. Are you using the same image for each page header?
Paul
|

02-01-2005, 06:03 AM
|
|
WebProWorld Member
|
|
Join Date: Apr 2004
Location: Netherlands
Posts: 80
|
|
thanks so much you guys, my page is now valid! How would I use CSS to load the background image? I'm using the same one for every page.
Another thing, before the page was validated (and had loads of errors), the page looked perfect in IE; the text was aligned to the left. In Firefox it was a bit different; it was centralized. Now with the valid html it looks perfect in Firefox and in IE it looks like it was before with Firefox. (hope this makes sense) How is this possible?
|

02-01-2005, 02:41 PM
|
|
WebProWorld Pro
|
|
Join Date: Nov 2004
Posts: 144
|
|
Looks like you've gotten everything taken care of.
You are quick!
|

02-02-2005, 06:48 PM
|
|
WebProWorld Member
|
|
Join Date: Apr 2004
Location: Netherlands
Posts: 80
|
|
Thanks you guys!
you know what's strange; in IE my pages look crappy when validated and they look perfect in Firefox/Safari, whilst this first was the other way around. Does IE just not accept the html?
|

02-02-2005, 07:37 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
Invalid tags in your CSS stylesheet
Hi wen_laat,
try using the following as your style.css
/* Stylesheet for TypicalDutchStuff */
a:link {
color:#333333;
text-decoration:none;
}
a:visited {
color:#333333;
text-decoration:none;
}
a:active {
color:#333333;
text-decoration:none;
}
a:hover {
color:#FF4040;
text-decoration:none;
}
body, tr, p, td {
font-size:8pt;
font-family:verdana;
color:#000000;
}
.heading {
text-align:center;
font-size:9pt;
font-family:verdana;
font-weight:bold;
color:#000000;
}
I noticed you have some code comments and <style> tags that are causing some discrepancies between the Firefox view and IE. Check and debug any differences after you've uploaded this modified stylesheet.
Paul
|

02-03-2005, 02:14 PM
|
|
WebProWorld Member
|
|
Join Date: Apr 2004
Location: Netherlands
Posts: 80
|
|
paulhiles:
Thank you. I've changed the stylesheet, and tried to validate another page, which isn't working. I've used the same things as my index page which is verified, but some things don't seem to be correct now, while they are on the other page.
Not validated yet
Also, I've found that as soon as I use
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
then the text aligns strangely in IE, but allright in other browers.
What am I doing wrong? I've been trying different things all day, but seem to be stuck. :(
|

02-03-2005, 03:05 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
Server side include (SSI) in the wrong spot?
Quote:
|
Originally Posted by wen_laat
I've used the same things as my index page which is verified, but some things don't seem to be correct now, while they are on the other page.
Not validated yet
|
On the feedback page you need to close the <head> of your document. Looks as though you have an include file / SSI in the wrong spot! There is HTML code for a table running straight after the closing script tag. The closing </head> and <body> tags are way down at line 267, 268! :o)
Paul
|

02-03-2005, 05:27 PM
|
|
WebProWorld Member
|
|
Join Date: Apr 2004
Location: Netherlands
Posts: 80
|
|
Re: Server side include (SSI) in the wrong spot?
Quote:
|
Originally Posted by paulhiles
Quote:
|
Originally Posted by wen_laat
I've used the same things as my index page which is verified, but some things don't seem to be correct now, while they are on the other page.
Not validated yet
|
On the feedback page you need to close the <head> of your document. Looks as though you have an include file / SSI in the wrong spot! There is HTML code for a table running straight after the closing script tag. The closing </head> and <body> tags are way down at line 267, 268! :o)
Paul
|
Ok, you have no idea how silly I just felt. The include file was inside the head tag, how could I overlook that?! *blushes* It's now validated, but when I use this code:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
It messes up the layout, so I'm just using
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
and it works perfectly in IE and Firefox!
I'm so thrilled, I'm going to change all the pages and then my site will be entirely validated! Who needs Oscommerce when you can do it all by hand ;)
Thanks again Paul, you've helped me a lot!
|

02-03-2005, 07:38 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
Great stuff!
Great to hear you've managed to get that sorted!
I think we have the makings of another hand-coder here! :o)
Paul
|

02-03-2005, 07:55 PM
|
|
WebProWorld Member
|
|
Join Date: Apr 2004
Location: Netherlands
Posts: 80
|
|
Re: Great stuff!
Quote:
|
Originally Posted by paulhiles
Great to hear you've managed to get that sorted!
I think we have the makings of another hand-coder here! :o)
Paul
|
Thanks! I did encounter another problem though, was almost afraid to ask, as I've asked so much already ;)
EDITED: I'm working on my other pages, but it seems as though the EUR symbol(€) gives an error, is there any way around this?
Just fixed this myself!
Also, I use Mals shopping cart, and the code seems to contain an error, but when I change it, the cart probably won't work properly.
One error left..
Thanks! (If I can figure out this thing, I can probably manage to do all my pages..
|

02-04-2005, 05:37 AM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
The form was incorrectly nested
You have three forms in the left-hand column and two in the main page content. The form that's causing the problem is the "newsletter" one. There are some invalid tags in there, table cells, font tags, etc!
Try using this instead...
<table bgcolor="#FBEBF3" border="0" cellpadding="3" cellspacing="0">
<tr><td align="center"><font size=1 face="Verdana,Arial,Helvetica">Join the Typical Dutch Stuff mailing list </font></td></tr>
<tr><td align="center"><font size=1 face="Verdana,Arial,Helvetica">Email:</font>
<form name="newsletter" action="http://www.typicaldutchstuff.com/newsletter.html" target="_blank" method="get">
<input type=text name="email" size=15>
<input type=submit name="go" value="Sign up">
</form></td></tr>
</table>
The form's attributes/values need quotes("") around the values too! That's about it, I think! :o)
One other point, you're displaying linked images from two other sites (the W3C logo and GeeksOnSteroids banner). I would advise you to have these images on your own server, as they're currently slowing down the page loading.
Paul
PS. Try taking some of your font tags out and replacing with CSS styled elements!
|

02-04-2005, 08:18 AM
|
|
WebProWorld Member
|
|
Join Date: Apr 2004
Location: Netherlands
Posts: 80
|
|
thank you! It's been fixed, you've helped me so much!
I don't really work with CSS, so have no idea how to change the fonts?
|

02-04-2005, 08:28 AM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
Glad to have helped!
Quote:
|
Originally Posted by wen_laat
thank you! It's been fixed, you've helped me so much!
|
You're welcome! Glad to have helped!
Quote:
|
Originally Posted by wen_laat
I don't really work with CSS, so have no idea how to change the fonts?
|
You could reduce your page sizes marginally by utilising more CSS, but you're not using so many font tags, I guess I'll let you off!
Any questions you might have on CSS, just try the Site Design forum and ask around, there are lots of knowledgeable members there! :o)
Paul
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|