-
SitePoint Enthusiast
Valadate, says Error in Code, help.
I am trying to validate some code, and I keep getting this error can someone help?
Here is the code:
<BODY BGCOLOR="#FFFFFF" ONLOAD="preloadImages();" TOPMARGIN="0" MARGINHEIGHT="0" LEFTMARGIN="0" MARGINWIDTH="0" LINK="#003366" VLINK="#660066" BACKGROUND="images/bkgd.gif">
Here are the errors I am getting from a valdating prg:
Error: unsupported attribute "marginheight" for tag <body>
Error: unsupported attribute "topmargin" for tag <body>
Can someone help?
-
Those margins arent supported for html4.
Use CSS instead to define the margins - not sure if it works in netscape 4 tho
-
Don't use any body tags 
<style type="text/css">
body
{
margin:0;
background-image: url;
background-color:#ffffff;
}
a
{
color:#003366;
}
a:link
{
color:#660066;
}
<style>
That should validate fine...
-
Originally posted by Maelstrom
Don't use any body tags
You mean to use only the <body> tag. If there was no <body> tag, your page surely wouldn't validate.
-
SitePoint Wizard
he probably meant body attributes
right Maelstrom?
-
Yes I did mean attributes. Oops. Sorry bout that...
BTW Redemtion no need to respond twice, I understood the first time
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks