Forum Moderators: open

Message Too Old, No Replies

Code Validation help

Code Validation help

         

SubJunk

6:29 am on Jun 16, 2005 (gmt 0)

10+ Year Member



When I validate the coding on my website I get plenty of errors like this:

Error: there is no attribute TOPMARGIN for this element (in this HTML version)

Is there a replacement for the "topmargin" tag that is valid?

SubJunk

6:34 am on Jun 16, 2005 (gmt 0)

10+ Year Member



The same is for "background" "vspace" "scroll" etc. All in the body tag. Is this because they've decided we should use CSS codes in the <head>s?

Also I get errors in the flash coding, such as:

<EMBED src="logo2.swf" quality=high bgcolor=#DBDBDB WIDTH=" ...
Error: there is no attribute SRC for this element (in this HTML version)

What is expected to be done about this?

SubJunk

6:39 am on Jun 16, 2005 (gmt 0)

10+ Year Member



Also it says I have the end tag </a> when it wasn't open in the first place, but here you see it was:

document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a>')

SubJunk

7:00 am on Jun 16, 2005 (gmt 0)

10+ Year Member



Don't worry about the first post, I just changed it to a stylesheet. But I really need help with the other two.

RonPK

7:51 am on Jun 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HTML 4.01 considers the embed element as deprecated. It is however the easiest way to display Flash animations in many browsers. My suggestion: ignore the validation error.

If you add a backslash to the </a> tag, the error will go away. <\/a>
The parser sees </ as the end of the script block; that's why you need to escape the /.

dcrombie

10:06 am on Jun 16, 2005 (gmt 0)



Try googling for "Flash Satay" ;)

rocknbil

3:59 pm on Jun 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Better yet, click here [macromedia.com]. The "satay" method completely removes many of the bloated attributes generated by the Flash publish command. You don't even need to use a base href. It takes less time to set this up than it does to read the article. And when you're done, it will validate. :-D

RonPK

7:39 pm on Jun 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I hate to spoil a party, but the last time I tried that technique (originally published on #*$!), there were major support issues with some versions of IE on some versions of Windows. It just didn't work.

If I had to choose between working code and validating code, I'd go for working code.

edit: funny, we're not allowed to even mention a well known site about web design...